Re: Question about how Cocoa handles multiple occurences of the same window
Re: Question about how Cocoa handles multiple occurences of the same window
- Subject: Re: Question about how Cocoa handles multiple occurences of the same window
- From: Yann Bizeul <email@hidden>
- Date: Tue, 20 Jul 2004 22:47:25 +0200
Hi,
You should maintain a NSArray of your NSWindowController subclasses, in
which you store path to the sound file.
Each time the use hits OK, a new ProgressController (subclass of
NSWindowController) would be instantiated, the added to your NSArray.
Then you can manage everything in ProgressController
Am I clear ?
Le 20 juil. 04, ` 22:26, K. Hoffmann a icrit :
>
I'm working on an application and have a question about how Cocoa
>
handles/references multiple occurences of the same window/nib.
>
>
In the app, the user sets a bunch of parameters to generate a sound
>
file, then hits execute. An auxillary window is loaded called
>
ProgressWindow which shows text updates about how far along the
>
generation is. Once it's done, buttons on the ProgressWindow allow the
>
user to quickly preview the sound and delete it if they don't like it.
>
>
The problem I had was storing the path of the generated sound, since
>
the user could generate a sound, leave the progress window open,
>
generate two others (which would open two more progress windows), then
>
go back and try to preview the first one. Its path would be gone. The
>
idea I had was to subclass NSWindow, then store the path of the
>
soundfile to be generated as a variable in the subclassed progress
>
window.
>
>
The problem is in the method that opens the progress window. There's a
>
call there to set the path of the generated soundfile in the window
>
via [[progressController window] setPath:blah], with
>
progressController being a NSWindowController. Unfortunately, this
>
call sets the path of every open progress window to blah. Since
>
there's only one global instance of progressController, and one outlet
>
to progressWindow, will any call to them automatically reference every
>
progress window that's open?
>
>
_________________________________________________________________
>
Dont just search. Find. Check out the new MSN Search!
>
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>
_______________________________________________
>
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.
>
>
>
--
Yann Bizeul - yann at tynsoe.org
http://projects.tynsoe.org/
_______________________________________________
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.