Skip navigation.
 
mlHelp with this code
FROM : Guillem Palou
DATE : Sat Mar 22 20:19:32 2008

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

Related mailsAuthorDate
mlHelp with this code Guillem Palou Mar 22, 20:19
mlRe: Help with this code Jens Alfke Mar 22, 21:29
mlRe: Help with this code Guillem Palou Mar 22, 23:23
mlRe: Help with this code Bill Monk Mar 23, 04:32
mlRe: Help with this code Jens Alfke Mar 23, 06:38