• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Help with this code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Help with this code
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: base64 NSData to NSString
  • Next by Date: Re: base64 NSData to NSString
  • Previous by thread: Re: base64 NSData to NSString
  • Next by thread: Re: Help with this code
  • Index(es):
    • Date
    • Thread