• 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
Why is the controller in my NSMovieView grayed out?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why is the controller in my NSMovieView grayed out?


  • Subject: Why is the controller in my NSMovieView grayed out?
  • From: "Tamara L. Cravit" <email@hidden>
  • Date: Mon, 12 May 2003 14:41:15 -0700
  • Organization: Taylored Software

Hi, all,

I've been working on a customized movie player program for MacOS X using
Cocoa. I've gotten my code mostly working, but I'm running into a
problem that I can't figure out. I have an NSMovieView inside of a panel
that is popped up by my main program. The main view's controller does
the following to open the popup and play the movie:

if (!popupPanel)
{
popupPanel = [[PanelController alloc] init];
}

[popupPanel showWindow: self];
[popupPanel playMovieFromURL: url];

That much of the code is working fine. The panel controller's
playMovieFromURL: method looks like the following:

- (void) playMovieFromURL: (NSURL *) theURL
{
movie = [[NSMovie alloc] initWithURL: theURL
byReference: YES];

if (nil == movie)
{
NSRunAlertPanel(@"Error", @"NSMovie object is
nil!", @"OK", @"", @"");
[self close];
}

// Set the movie for the NSMovieView
[movieView setMovie: movie];
[movieView setPlaysEveryFrame: NO];
[movieView setVolume: 1.0];

// Resize the NSMovieView to the size of the movie
[movieView showController: YES adjustingSize: NO];
[movieView resizeWithMagnification: 1.0];
[movieView showController: YES adjustingSize: YES];

// Resize the panel to the size of the NSMovieView
[thePanel setFrame: [movieView bounds] display: YES];

// Start playing the movie
[movieView start: thePanel];
}

This code seems to work, the movie starts playing, and so forth.
However, when the movie loads, the controller at the bottom of the
NSMovieView is grayed out, meaning the user can't pause or stop the
movie. I can't see anything obviously wrong in the code above that would
cause the controller to be grayed out.

In the PlayerPanel.nib file, the NSMovieView has the following attribute
settings:

Loop mode: normal
Show controller: checked
Plays selection only: unchecked
Plays every frame: unchecked
Is editable: checked

Can anyone suggest what I'm doing wrong? Thanks in advance!

Sincerely,
Tamara L. Cravit, Partner

--
Taylored Software
Custom Software Development for Your Enterprise
PO Box 2445, Lompoc CA 93438-2445
Phone: (805) 735-8878 / Fax (805) 735-8129
E-mail: email@hidden
Web: http://www.taylored-software.com/
CrystalVoice LIVE Phone Name: TamaraCravit
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Inconsistencies with NSString in GDB
  • Next by Date: Re: self release
  • Previous by thread: NSOpenPanel ignoring its directory.
  • Next by thread: 2100 Errors, none are my fault!
  • Index(es):
    • Date
    • Thread