Re: cocoa-dev digest, Vol 1 #992 - 13 msgs
Re: cocoa-dev digest, Vol 1 #992 - 13 msgs
- Subject: Re: cocoa-dev digest, Vol 1 #992 - 13 msgs
- From: David Kopec <email@hidden>
- Date: Wed, 19 Dec 2001 14:55:53 -0500
Fei,
The display method that you're calling is not for the purpose that
you're attempting to use it. Instead use [window2
makeKeyAndOrderFront:self] The self part is for a reference to the
object that is sending the message. Also to hide window1 call [window1
orderOut:self]
For more information see the NSWindow docs:
http://developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/
ObjC_classic/Classes/NSWindow.html
David
On Wednesday, December 19, 2001, at 12:03 PM, cocoa-dev-
email@hidden wrote:
Hello all,
I need to display window1 in my application and after user click a
button on
window1, it will bring up window2 and kill itself. Window2 is a
subclass of
NSWindow. I create both windows in IB in the same nib file, and set
window1's attribute "visible at launch time" as Yes, window2's as No.
But
when I use [window2 display] I have an error: window2 does not respond
to
display method.
So, my problem is:
1.How to display a window with attribute "visible at launch time" is No
in
IB?
2.If I can have a window with IB but create it programmatically(or
when I
need it)?
These seems to be easy questions but really give me a headache. Thanks
anybody help me out!
Fei