Re: [newbie]How to pop a window?
Re: [newbie]How to pop a window?
- Subject: Re: [newbie]How to pop a window?
- From: Uli Kusterer <email@hidden>
- Date: Sat, 8 Jul 2006 12:41:37 +0200
Am 08.07.2006 um 06:26 schrieb Bus Mini:
Thanks for you advice. Now suppose I have two windows created in
nib, one is the main window which was showed when app started,
another is the one I want it to poped up when I click a button in
main window.
And the followed code was called when the button was clicked,
IBOutlet NSWindow *myWindow;
You *have* hooked up this outlet in IB, have you?
.............
[myWindow showWindows] //this doesn't work
Of course not. myWindow is an NSWindow, showWindows is a method on
NSDocument. It's like telling a skating rink to fly :-S
[myWindow display] //this doesn't work either
Check out the docs. Display is for redrawing a window that's
already visible, not for actually showing it.
[myWindow print:self];//this doesn't work either
[myWindow makeKeyAndOrderFront:nil];//this doesn't work either
These two *should* work.
Must I set something special?
Do you have a good book on Cocoa? I strongly suggest you get Aaron
Hillegass's "Cocoa Programming for Mac OS X (2nd ed.)". It will walk
you through all the basics.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden