Help with this code
Help with this code
- Subject: Help with this code
- From: "Guillem Palou" <email@hidden>
- Date: Sat, 22 Mar 2008 20:19:32 +0100
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 (email@hidden)
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:
This email sent to email@hidden