Obtaining class of key at runtime

2014-10-06 Thread Devarshi Kulshreshtha
I have a class with below interface: @interface MyData : NSObject @property (readwrite, strong) NSString *urlToParse; @property (readwrite, strong) MappingElement *titleElement; - (instancetype)initWithPlist:(NSString *)plistPath; Its implementation is like this: -

Re: Obtaining class of key at runtime

2014-10-06 Thread Jens Alfke
On Oct 6, 2014, at 7:43 AM, Devarshi Kulshreshtha devarshi.bluec...@gmail.com wrote: Scenario 1: Do not initialize instance variables in initWithPlist method In this case if I try to log class of key in setValue:forKey method, it prints nil That doesn't make any sense — it's illegal to

Re: Obtaining class of key at runtime

2014-10-06 Thread Devarshi Kulshreshtha
Scenario 1: Do not initialize instance variables in initWithPlist method In this case if I try to log class of key in setValue:forKey method, it prints nil That doesn't make any sense — it's illegal to pass a nil key to setValue:ForKey:. Who is calling this method? This method is

Re: Obtaining class of key at runtime

2014-10-06 Thread David Duncan
On Oct 6, 2014, at 10:12 AM, Devarshi Kulshreshtha devarshi.bluec...@gmail.com wrote: Scenario 1: Do not initialize instance variables in initWithPlist method In this case if I try to log class of key in setValue:forKey method, it prints nil That doesn't make any sense — it's