Re: Using one NSWindow to open many NSWindows?
Re: Using one NSWindow to open many NSWindows?
- Subject: Re: Using one NSWindow to open many NSWindows?
- From: Carlos Weber <email@hidden>
- Date: Sun, 27 Jan 2002 08:07:18 -1000
On Sunday, January 27, 2002, at 03:54 , Gore wrote:
I want to create my own alert panel, but the content of my alert panel
should be different depending on the message I want to be shown, that's
why I can't use one NSWindow instance because it will display the
latest message on every alert panel...so how do I display many
nswindows with different messages using one "template"? should I use
some bundle things...or something like that?
Sounds like you want to create a separate nib file in IB to lay out your
alert panel, then instantiate its window anew for each of your various
alerts. Your hard disk contains an example to get you started, at
/Developer/Examples/InterfaceBuilder/SimpleMultiWindow/
altho in that example the code is written to ensure that the second
window is instantiated only once, and recycled if called again. Starting
from there, you can figure out how to do it the way you want.