Re: [Pyobjc-dev] More on integer values
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2003-02-03 00:52:54
|
On Sunday, Feb 2, 2003, at 19:46 America/New_York, David Eppstein wrote: > I just hit an error in my code; looks like the following scenario > happened: > 1. My code passed an integer value to > undoManager.prepareWithInvocationTarget_ > 2. I invoked an undo. > 3. undoManager called my code with an NSCFInteger in place of the > integer > (so far, no problem...) > 4. my code used that value as the column parameter of > NSTableView.editColumn_row_withEvent_select_ > 5. TypeError: expected an integer for argument 1: its typespec is 'i12' > > As usual, the workaround is to wrap the value in an int(), but > shouldn't an objc integer be allowed to be used for this typespec? Well, from ObjC I would say no, if it expects an integer, it should get an int. int and NSNumber aren't interchangable on the ObjC side of things. -bob |