Re: Dumb newbie question about objects and scalars
Re: Dumb newbie question about objects and scalars
- Subject: Re: Dumb newbie question about objects and scalars
- From: John Stiles <email@hidden>
- Date: Mon, 14 Mar 2005 15:54:20 -0800
More than ugly, the former wouldn't compile at all. Cases need to be
constant values. A method call is no good.
On Mar 14, 2005, at 3:36 PM, Martin wrote:
I would leave your enum typedef intact and just box the values in
NSNumbers when you need. So instead of the ugly:
switch ( [theBehavior intValue] )
case [GLFreeform intValue]: {...}
case [GLSlugline intValue]: {...}
case [GLAction intValue]: {...}
You do:
switch( [theBehavior intValue] )
case GLCharacter: { ... }
case GLParenthetical: { ... }
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden