Revisited: NSMovieView in a panel ?
Revisited: NSMovieView in a panel ?
- Subject: Revisited: NSMovieView in a panel ?
- From: Marco Steinbach <email@hidden>
- Date: Thu, 3 Apr 2003 19:01:34 +0200
Hi,
I found this list to be an invaluable source of information, so far,
but the archives fail on me, this time, so it seems about time to
delurk. Ondra Cada posted this question some time ago, but go no
answer, afaik. Now I'm having a similar, if not the same problem.
My application has a panel window, in which I intend to show previews
of data selected in the main window. So far I integrated a scrollable
NSTextView and a proportionally resizing NSImageView into this panel,
both of which are programmatically created, then added and removed from
the containing view as needed.
This works flawlessly (and was extremly painless to integrate, I have
to say thanks to these parts of Cocoa) for NSTextView and NSImageView.
Now I'd like to be able to show Quicktime movies (and any other type of
data an NSMovie can deal with) as a third, also automatically added and
removed preview into the panel.
All works well, but the controller of the NSMovieMovie is grayed out
all the time. Sending a start: message does play the movie correctly,
though. As a sidenote, NSMovieView works flawlessy when added to the
main window.
I would like to present a familiar interface, to avoid confusing the
user with never seen buttons and elements in this preview panel. So far
I did, however, not find any other possibility of letting the user
control the movie than creating my own UI elements, and connecting them
to my NSMovieView.
Here's a sniped of code to depict what I'm doing:
thePreviewView is an NSView
theMovie is my movie
thePrevieMovieView is the NSMovieView
movieURL is an NSURL pointing to the file the movie is contained in
thePreviewMovieView = [[NSMovieView alloc]
initWithFrame:[thePreviewView bounds]];
[thePreviewMovieView showController:YES adjustingSize:NO];
[thePreviewView addSubview:thePreviewMovieView];
theMovie = [[NSMovie alloc] initWithURL:movieURL
byReference:YES];
[thePreviewMovieView setMovie:theMovie];
As said, the movie shows up and can be played via [thePreviewMovieView
start:self], but the controller is grayed out.
I tried finding information on this, but was unable to unearth anything
explaing this behaviour.
Anyone able to point my nose to what I'm doing wrong there ?
Thanks in advance.
PS: MacOSX 10.2.4, Dec 2002 Developer Tools, Quicktime Pro 6.1.1
_______________________________________________
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.