• 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: NSView setHidden vs. setTransparent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView setHidden vs. setTransparent


  • Subject: Re: NSView setHidden vs. setTransparent
  • From: Tim Hewett <email@hidden>
  • Date: Fri, 19 Mar 2004 14:01:38 +0000

Christopher,

On 18 Mar 2004, at 23:41, email@hidden wrote:

I have been working on a small application on my 10.3.2 machine with
Xcode and only realized now that "setHidden" is not supported in 10.2.

I discovered that to my expense yesterday too, when I found that the
latest release of my app crashed with a loud bang under 10.2 because
it now uses setHidden.

My quick question is, are these two examples equivalent?

Example #1:
[myButton setHidden:YES];

Example #2:
[myButton setTransparent:YES];
[myButton setEnabled:NO];

My initial tests say that they are, but I want to be sure.

They are not equivalent - setTransparent: is only available for NSButton
whereas setHidden is inherited from the general NSView class. The
setHidden selector will automatically also hide any descendents of a view,
setTransparent will not. Also if your view has a menu associated with it,
setHidden will ensure it will not pop up when right/control-clicked,
setTransparent will not. I'm not sure if that is the case if you also use
setEnabled:NO.

Thanks in advance.

--
Christopher Huyler
Computer Associates Intl.

Regards,

Tim Hewett, Coolatoola.com
_______________________________________________
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.


  • Prev by Date: Nested Modal Window in Cocoa framework - Is there a bug in Cocoa?
  • Next by Date: Re: Leave NSLog()s in Final Product? - solution
  • Previous by thread: Re: NSView setHidden vs. setTransparent
  • Next by thread: NSDrawer -> NSTextView strangeness.
  • Index(es):
    • Date
    • Thread