i'm receiving an unrecognized selector sent to instance crash with the
following code, but i can't figure out why.  the program crashes when
trying to set the timer's user info into local variables in
fadeCallBack:

___________________

        //Create Dictionary To Add To The Timer's userInfo Parameter
        NSMutableDictionary *timerUserInfoDictionary = [[NSMutableDictionary
alloc] init];
        [timerUserInfoDictionary setObject:[NSNumber
numberWithInteger:soundID] forKey:@"soundID"];
        [timerUserInfoDictionary setObject:[NSNumber
numberWithFloat:targetVolume] forKey:@"targetVolume"];
        [timerUserInfoDictionary setObject:[NSNumber
numberWithFloat:duration] forKey:@"duration"];

        //Execute Fade
        self.fadeStartDate = [NSDate date];
        NSDate *now = [fadeStartDate addTimeInterval:0];
        NSTimer *timer = [[NSTimer alloc] initWithFireDate:now interval:0.15
target:self selector:@selector(fadeCallBack:)
userInfo:timerUserInfoDictionary repeats:YES];
        [[NSRunLoop currentRunLoop] addTimer:timer 
forMode:NSDefaultRunLoopMode];
        self.fadeTimer = timer;
        
        [timerUserInfoDictionary release];
        [timer release];
        }

- (void)fadeCallBack:(NSTimer *)timer
        {
        //Timer's User Info
        NSUInteger soundID      = [[timer userInfo] integerForKey:@"soundID"];
        float targetVolume      = [[timer userInfo] 
floatForKey:@"targetVolume"];
        float duration          = [[timer userInfo] floatForKey:@"duration"];
___________________
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to