Re: [Pythonmac-SIG] Getting None in KVC objectInKeyAtIndex_

2009-04-14 Thread Ronald Oussoren
A better way to define such accessors is like so: @objc.accessor def objectInFooAtIndex_(self, index): pass This should deduce the right method signature based on the method name. I guess this needs better documentation :-( Ronald On 13 Apr, 2009, at 19:00, David Hain wrote:

Re: [Pythonmac-SIG] Getting None in KVC objectInKeyAtIndex_

2009-04-13 Thread David Hain
On Apr 13, 2009, at 2:10 AM, Johan Rydberg wrote: http://jimmatthews.wordpress.com/2007/07/12/objcselector-and-objcsignature/ Yes! That was exactly what I needed. I had actually thought that pyobjc could be interpreting a zero as nil, and did something like: if index is None: index = 0

Re: [Pythonmac-SIG] Getting None in KVC objectInKeyAtIndex_

2009-04-13 Thread Johan Rydberg
David Hain skrev: I'm trying to use bindings to hook up my model to an NSOutlineView, and I'm attempting to use the countOf, objectInAtIndex_ methods to do the KVC half. The problem I'm running into is that I'm getting None for the index argument, and I can't figure out what to do with that. Th

[Pythonmac-SIG] Getting None in KVC objectInKeyAtIndex_

2009-04-12 Thread David Hain
I'm trying to use bindings to hook up my model to an NSOutlineView, and I'm attempting to use the countOf, objectInAtIndex_ methods to do the KVC half. The problem I'm running into is that I'm getting None for the index argument, and I can't figure out what to do with that. The reference ma