I would like to use a class' object to indicate certain conditions (and
be able to handle it like a regular object, put it in collections,
etc.). I tried having something like that:
and then using BadFoo instead of a Foo instance to indicate some error
condition, for example. So I now know this cannot be done, because the
BadFoo class object is not of type id and can only stand for the class
object as the receiver in a message expression (p. 47 of the ObjC
manual). For example, I cannot do
NSArray* a = [NSArray arrayWithObject:BadFoo];
but I can do
NSArray* a = [NSArray arrayWithObject:[BadFoo class]];
Is there any way to implement this idea without having to retype
[BadFoo class] all the time? Or am I trying to do something stupid
that doesn't make sense?
Thanks for any help!
--
ivan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden