Re: How to create to-many accessor methods at runtime

2008-07-08 Thread Steve Weller
On Jul 8, 2008, at 8:55 AM, Mike Abdullah wrote: On 8 Jul 2008, at 15:45, Steve Weller wrote: On Jul 8, 2008, at 2:28 AM, Mike Abdullah wrote: On 8 Jul 2008, at 07:10, Steve Weller wrote: What I am attempting to do is not working. -valueForKey: does not look for methods with -respon

Re: How to create to-many accessor methods at runtime

2008-07-08 Thread Mike Abdullah
On 8 Jul 2008, at 15:45, Steve Weller wrote: On Jul 8, 2008, at 2:28 AM, Mike Abdullah wrote: On 8 Jul 2008, at 07:10, Steve Weller wrote: What I am attempting to do is not working. -valueForKey: does not look for methods with -respondsToSelector: to figure out if methods exist suffi

Re: How to create to-many accessor methods at runtime

2008-07-08 Thread Steve Weller
On Jul 8, 2008, at 2:28 AM, Mike Abdullah wrote: On 8 Jul 2008, at 07:10, Steve Weller wrote: What I am attempting to do is not working. -valueForKey: does not look for methods with -respondsToSelector: to figure out if methods exist sufficient to have KVC. So overriding this has no eff

Re: How to create to-many accessor methods at runtime

2008-07-08 Thread Mike Abdullah
On 8 Jul 2008, at 07:10, Steve Weller wrote: Just to follow up on my own question... What I am attempting to do is not working. -valueForKey: does not look for methods with -respondsToSelector: to figure out if methods exist sufficient to have KVC. So overriding this has no effect. My

Re: How to create to-many accessor methods at runtime

2008-07-07 Thread Steve Weller
Just to follow up on my own question... What I am attempting to do is not working. -valueForKey: does not look for methods with -respondsToSelector: to figure out if methods exist sufficient to have KVC. So overriding this has no effect. My only option, it seems, is to use +resolveInsta

Re: How to create to-many accessor methods at runtime

2008-07-06 Thread Steve Weller
On Jul 6, 2008, at 5:02 PM, Ben Trumbull wrote: First, have you considered the low tech approach of using a gcc variadic macro (#define) ? You can generate a lot of template code this way. With one line of code per key you can gen

re: How to create to-many accessor methods at runtime

2008-07-06 Thread Ben Trumbull
Steve, First, have you considered the low tech approach of using a gcc variadic macro (#define) ? You can generate a lot of template code this way. With one line of code per key you can generate all the accessors you need. A seco

Re: How to create to-many accessor methods at runtime

2008-07-06 Thread Ken Thomases
On Jul 6, 2008, at 12:56 PM, Steve Weller wrote: I had thought that implementing forwardInvocation would do this, but -forwardInvocation is only called if -respondsToSelector says NO. And if -respondsToSelector says NO, then the tests for -countOf and -objectIn:atIndex: will always fail and