Re: Alternative KVC accessors

2010-01-02 Thread Shane Stanley
On 3/1/10 5:32 AM, "Mike Abdullah" wrote: > This sounds a pretty odd approach, and is also going to give you pretty > confusing code to read. It's not ideal, for sure. But it gives me a usable getter as long as I use valueForKey: calls, and therefore works fine with bindings, which is my main co

Re: Alternative KVC accessors

2010-01-02 Thread Mike Abdullah
On 1 Jan 2010, at 21:45, Shane Stanley wrote: > On 1/1/10 11:15 PM, "Mike Abdullah" wrote: > >> Are you saying you want a synthesized - method, and then also write an >> -is method? > > Sort of... What I'm actually trying to do is write a getter in > AppleScriptObjectiveC. > > When you declar

Re: Alternative KVC accessors

2010-01-01 Thread Shane Stanley
On 1/1/10 11:15 PM, "Mike Abdullah" wrote: > Are you saying you want a synthesized - method, and then also write an > -is method? Sort of... What I'm actually trying to do is write a getter in AppleScriptObjectiveC. When you declare a property in ASObjC, it seems accessors are synthesized autom

Re: Alternative KVC accessors

2010-01-01 Thread William Squires
* accessors starting with "getXXX" usually expect pointers to something and return their results into space pointed to, IIRC. * accessors starting with "isXXX" return BOOL. * all other KVC accessors return primitive data types (including data structures such as NSRect, NSPoint, etc...) and o

Re: Alternative KVC accessors

2010-01-01 Thread Mike Abdullah
On 31 Dec 2009, at 07:03, Shane Stanley wrote: > The documentation says: > > "The format for an accessor method that returns a property is -. The > - method returns an object, scalar or a data structure. The alternate > naming form -is is supported for Boolean properties." > > A small number of

Alternative KVC accessors

2009-12-31 Thread Shane Stanley
The documentation says: "The format for an accessor method that returns a property is -. The - method returns an object, scalar or a data structure. The alternate naming form -is is supported for Boolean properties." A small number of test suggest -is is supported more generally. Elsewhere, the