• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Window visiblity and Check Boxes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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!

I ve got two problems:

First:
How do I make an window invisible? I tried [window setVisible:NO]; but that
didn t 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.
References: 
 >Window visiblity and Check Boxes (From: Martin Weil <email@hidden>)

  • Prev by Date: Re: Obj-C, class methods and instance methods
  • Next by Date: Re: Window visiblity and Check Boxes
  • Previous by thread: Window visiblity and Check Boxes
  • Next by thread: Re: Window visiblity and Check Boxes
  • Index(es):
    • Date
    • Thread