Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > The Lighthouse thread

The Lighthouse thread
Thread Tools
Gametes
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status: Offline
Reply With Quote
May 30, 2003, 01:18 PM
 
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
     
Uncle Skeleton
Addicted to MacNN
Join Date: Nov 2002
Location: Rockville, MD
Status: Offline
Reply With Quote
May 30, 2003, 03:48 PM
 
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
     
Gametes  (op)
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status: Offline
Reply With Quote
May 30, 2003, 06:25 PM
 
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 Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:12 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,