Re: Window visiblity and Check Boxes
Re: Window visiblity and Check Boxes
- Subject: Re: Window visiblity and Check Boxes
- From: Shawn Erickson <email@hidden>
- Date: Sun, 19 May 2002 10:36:34 -0700
On Sunday, May 19, 2002, at 10:11 AM, Martin Weil wrote:
Hi!
Ive got two problems:
First:
How do I make an window invisible? I tried [window setVisible:NO]; but
that
didnt worked.
From NSWindow docs... try orderOut. I suggest reading over the "Window
and Panels" programming topic referenced from NSWindow API doc page,
especially the "Setting a Window's Level" task.
But I get this error when the action is called:
2002-05-19 19:09:36.990 ThisProgram[6161] *** -[NSButton boolValue]:
selector not recognized
2002-05-19 19:09:36.996 ThisProgram[6161] *** -[NSButton boolValue]:
selector not recognized
Looking at the docs for NSButton how about trying "state". In the case
of a check box it could one of three states on, off and mixed, so a
boolean is not sufficient.
------------
- (int)state
Returns the receiver's state. The button can have two or three states.
If it has two, it returns either NSOffState (the normal or unpressed
state) or NSOnState (the alternate or pressed state). If it has three,
it returns NSOnState (the feature is in effect everywhere), NSOffState
(the feature is in effect nowhere), or NSMixedState (the feature is in
effect somewhere).
To check whether the button uses the mixed state, use the method
allowsMixedState.
------------
-Shawn
P.S. Cocoa API docs are available on you system locally
/Developer/Documentation/Cocoa/Reference/ or online from Apple
<
http://developer.apple.com/techpubs/macosx/Cocoa/CocoaTopics.html>.
_______________________________________________
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.