Hi all, anyone knows what's wrong with this code?

-(void)loadStateChanged:(NSNotification *) notification
{
    QTMovie *movie = [notification object];
    long loadState = [[movie attributeForKey:QTMovieLoadStateAttribute]
longValue];
    if (loadState >= 20000)
            [clipMovieView
setMovie:movie];                                             <--- crash
}


QTMovie *movie = [QTMovie movieWithQuickTimeMovie:[currentObject theMovie]
disposeWhenDone:NO error:nil];

[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(loadStateChanged:)
name:QTMovieLoadStateDidChangeNotification object:movie];

if (nil == error)
{
      [movie retain];
      [[NSNotificationCenter defaultCenter] postNotification:[NSNotification
notificationWithName:@"QTMovieLoadStateDidChangeNotification"
object:movie]];
}

It crashes when I call the setMovie method of the QTMovieView Object. The
code seems to work with movieWithFile instead of movieWithQuicktimeMovie.

Anyone knows what happens?

Thanks to all!

Guillem
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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