Question about how Cocoa handles multiple occurences of the same window
Question about how Cocoa handles multiple occurences of the same window
- Subject: Question about how Cocoa handles multiple occurences of the same window
- From: "K. Hoffmann" <email@hidden>
- Date: Tue, 20 Jul 2004 16:26:50 -0400
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.