Re: loading in accessors from dictionary item...
Re: loading in accessors from dictionary item...
- Subject: Re: loading in accessors from dictionary item...
- From: Scott Anguish <email@hidden>
- Date: Fri, 20 Feb 2004 18:00:21 -0500
On Feb 20, 2004, at 5:28 PM, email@hidden wrote:
ok what i do is load in accessors from a file then loop through a
dictionary and call them the accessors access values in a subclass i
wrote ie
[subclass accessor];
the accessors are just strings in the dictionary when i try
[subclass [dict objectForKey:@"accessor"]];
to references the accessor it just says parse error before
"objectForKey"
i figure i'm doing this wrong but i can't figure out how to make it
work?
you're trying to use an object as a method selector.
If the accessors are strings, you'd need to make a selector from the
string (there is a function for that). But even then you'll need to do
something other than what you're doing. You'll need to use a method
call to make the subclass object perform the selector.
look at
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
ObjC_classic/Protocols/NSObject.html#//apple_ref/doc/uid/20000052/
BBCBGHFG
and
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
ObjC_classic/Functions/FoundationFunctions.html#//apple_ref/doc/uid/
20000055/BCIEICGB
_______________________________________________
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.