Re: Newbie with stupid question
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.