• 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
Re: QuickTime, NSMovieView woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QuickTime, NSMovieView woes


  • Subject: Re: QuickTime, NSMovieView woes
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Mon, 8 Nov 2004 02:15:28 +0100

At 18:55 Uhr -0500 07.11.2004, Michael Hanna wrote:
If I load a movie into an nsmovieview via the openPanel, it plays([mymovieview isPlaying] returns 1). However, if I load it in my document-based app via loadDataRepresentation:ofType: (using the exact same reading method mind you), the movie won't play: [mymovieview isPlaying] returns 0, even though I sent the message [mymovieview start:sender].

loadDataRepresentation: is called *before* the NIB file has been loaded. So all your outlets are NIL. Ergo, your start message is sent to NIL, which is legal but pointless.


You should check whether mymoviewview == nil, and if it is, keep the movie in a member variable which is checked in awakeFromNib. awakeFromNib should then assign the movie to the NSMovieView view and play it.

Note that if you call e.g. "revert" on your document, the NIB won't be loaded again. So, leave the old code in there and make it conditional on mymovieview not being nil (or better, just have a startplaying method that contains that code which is called from loadDataRepresentation: and awakeFromNib.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >QuickTime, NSMovieView woes (From: Michael Hanna <email@hidden>)

  • Prev by Date: Re: Desktop Window Level?
  • Next by Date: image drawing glitch
  • Previous by thread: QuickTime, NSMovieView woes
  • Next by thread: Desktop Window Level?
  • Index(es):
    • Date
    • Thread