It sounds like you might want to set up the window in a new nib file,
which you load and unload with NSWindowController by creating a new
NSWindowController instance and then calling -showWindow: on it.
This also gives you a convenient location to start adding controller
code for the contents of the new windows; you can subclass
NSWindowController and add them to that object, which will be the
File’s Owner of the new nib.
Rob
On 9-Dec-08, at 4:24 PM, Jushin wrote:
In my application, I have to open a form window when a user press a
button.
It is somewhat similar to Apple Mail. In Apple Mail, if you click "New
Message" button from the toolbar, a "New Message" window is appeared.
For now, what I did was something like this:
In IB, I added a window (or a panel), and the associated button shows
the window by using makeKeyAndOrderFront method when pressed.
However, I realized it is not what I want.
In this case, a window is already created, and the button only shows
or hides the window.
What I want is really creating a window when a user presses the
button, so that the user can creates multiple windows by pressing the
button.
I wonder how can I do this.
The window will contain form fields to get values for Core Data
models.
Thanks,
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/rix.rob%40gmail.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]