On Dec 18, 2011, at 3:14 AM, Ken Thomases wrote:

> On Dec 18, 2011, at 3:06 AM, Charles Srstka wrote:
> 
>> On Dec 18, 2011, at 2:49 AM, Ken Thomases wrote:
>> 
>>> On Dec 18, 2011, at 2:36 AM, Charles Srstka wrote:
>>> 
>>>> On Dec 18, 2011, at 2:31 AM, C.W. Betts wrote:
>>>> 
>>>>> So I would do something along the lines of [NSArray 
>>>>> arrayWithObjects:ClassName1, ClassName2, nil]?
>>>> 
>>>> Or just class1, class2, etc. where class1 and class2 are both of type 
>>>> Class.
>>> 
>>> You can use pointers to class objects, but you can't just use class names.  
>>> If you are starting from class names, you use [ClassName1 class] to get the 
>>> class object.
>> 
>> Well, you *could* just use class names, if you used NSClassFromString() 
>> before using the class. There wouldn’t be much point in doing that, though, 
>> since class objects can fit inside arrays and would be more convenient to 
>> use here.
> 
> Did you mean for this to be off-list?  Anyway, I took his use of ClassName1 
> to mean an identifier.  After all, he didn't write @"ClassName1”.

Nope, sorry, that was meant to be on-list. You’re probably right — I had 
assumed that those were meant to be NSString variables, since that’s what you’d 
need to be using if you were storing class names. Wasn’t thinking from an Obj-C 
newbie perspective there; sorry. At any rate, getting the class object by 
calling +class is, of course, the correct thing to do.

Charles

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to