• 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: Newbie with stupid question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie with stupid question


  • Subject: Re: Newbie with stupid question
  • From: Lance Bland <email@hidden>
  • Date: Mon, 18 Mar 2002 13:24:23 -0500

On Monday, March 18, 2002, at 12:48 PM, email@hidden wrote:

While [gamma setEnabled:[sender state]] makes sense to experienced Cocoa programmers, and works, it's important for newbies to understand *why*. That's what I was trying to do. The best-laid plans...

It only makes sense because the non-off states all have value non-zero in the enumerated type, so it is implementation dependent. I would use [gamma setEnabled:([sender state] != NSOffState)].

In the previous version of Cocoa (OpenStep) state returned a BOOL type, as I recall, hence all the code that doesn't use NSCellStateValue type.

-lance


_______________________________________________
Lance Bland
System Administrator at VVI
mailto:email@hidden
http://www.vvi.com
Realtime, bulk and web data reporting and visualization
_______________________________________________
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.

  • Follow-Ups:
    • Re: Newbie with stupid question
      • From: Ondra Cada <email@hidden>
References: 
 >Re: Newbie with stupid question (From: email@hidden)

  • Prev by Date: Re: expanding the view area of a window - please help
  • Next by Date: NSString drawAtPoint under non-identity CTM doesn't draw anything
  • Previous by thread: Re: Newbie with stupid question
  • Next by thread: Re: Newbie with stupid question
  • Index(es):
    • Date
    • Thread