Re: [Pyobjc-dev] PyObjc supports XCode 5.0 and 10.9?
Brought to you by:
ronaldoussoren
|
From: Marc V. O. <ma...@ac...> - 2014-05-17 15:09:59
|
Ronald,
Just switched our app over to PyObjc 3.0 and XCode 5.1.1
biggest change I had to do was to change super to pyobjc.super, and just fixed a few 10.8 warnings of deprecated methods.
One issue I notice that that PyObjc warnings is on in debug mode of the app:
and I get a lot of these
2014-05-17 10:35:59.072 Checkout[51943:303] *** ObjC exception 'NSRangeException' (reason: '*** -[__NSArrayM objectAtIndex:]: index 2 beyond bounds [0 .. 1]') discarded
Stack trace (most recent call last):
PyObjCNativeSelector_Type (in _objc.so) + 0
objcsel_call (in _objc.so) + 228
PyObjCFFI_Caller (in _objc.so) + 3305
ffi_call (in _objc.so) + 125
ffi_call_SYSV (in _objc.so) (x86-darwin-Kjl12T.s:63)
-[__NSArrayM objectAtIndex:] (in CoreFoundation) + 251
objc_exception_throw (in libobjc.A.dylib) + 230
NSExceptionHandlerExceptionRaiser (in ExceptionHandling) + 211
this one for example is generated by this iterator:
# Categorize devices
for keyboard in DDHidLib.DDHidKeyboard.allKeyboards():
# Don't recheck devices that have been categorized already
# NSLog(u'%@', unicode(keyboard.descriptionDictionary()))
Also this iterator is causing exceptions:
for subview in self.tabView.subviews():
if subview.isKindOfClass_(SFTabButton):
tabsByOriginXDict[Foundation.NSMinX(subview.frame())] = subview
but I see a common issue for this.
I could add changes to this: (but I will wait for you input.)
def nsarray__getitem__(self, idx):
if isinstance(idx, slice):
start, stop, step = idx.indices(len(self))
return [self[i] for i in range(start, stop, step)]
elif not isinstance(idx, INT_TYPES):
raise TypeError("index must be a number")
if idx < 0:
idx += len(self)
if idx < 0:
raise IndexError("list index out of range")
return container_unwrap(self.objectAtIndex_(idx), RuntimeError)
marc
On Mar 7, 2014, at 11:34 AM, Marc Van Olmen <ma...@ac...> wrote:
>
> On Mar 4, 2014, at 6:50 AM, Ronald Oussoren <ron...@ma...> wrote:
>
>> I guess it really time to push out a new release.
>>
>> The PyObjC version in the repository (a 3.0 prerelease) builds cleanly with Xcode 5 on OSX 10.9. To be honest I’m not sure if the current public release builds cleanly on 10.9 because I haven’t used it in a long time.
>
>
> That would be nice, we are planning a major release of Checkout 4.0 in upcoming weeks, would be nice to go beta with PyObjc 3.0 release)
>
> Marc
>
>
|