|
|
The Lighthouse thread
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status:
Offline
|
|
Since traffic is so low, I'll just post my own answers here.
Quicktime issue:
Problem: "I'm downloading/streaming a movie from the internet but it never shows up in my NSMovieView"
Solution: the NSMovie doesn't know to wait for quicktime's headers to finish loading and download the movie before it tries to init the NSMovie. So it's getting nothing because of the delay. Your code needs to look like:
Code:
NSURL *url = [NSURL URLWithString:[sender stringValue]];
NSMovie *fakeMovie = [[NSMovie alloc] initWithURL:url byReference:NO];
NSMovie *movie = [[NSMovie alloc] initWithURL:url byReference:NO];
[movieView setMovie:movie];
so that the headers get loaded before you need to download the real movie from the net. Also, if you can force preload the headers at launch that should work, But I don't know a lick of C or anything other than [object message] from Cocoa.
|
you are not your signature
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Nov 2002
Location: Rockville, MD
Status:
Offline
|
|
if you add a -(void)awakeFromNib method to one of your IB classes, it will get called when the nib file is loaded. Also there's the NSApp delegate method -(void)applicationDidFinishLaunching:(NSNotificatio n *) or something similar. these methods are where I do my on-launch code
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status:
Offline
|
|
Thanks, but that's not quite the problem I was describing. I know how to do on launch code, butthe alternative solution I mentioned was to force-load the libraries at launch time. That's what I'm missing.
No matter, this was works the same. I've already written apple to tell them that NSMovie is impatiently initialized.
|
you are not your signature
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|