Re: [Pyobjc-dev] caution with BOOL parameters
Brought to you by:
ronaldoussoren
From: Chris R. <cp...@em...> - 2003-03-03 13:52:42
|
Bob-- On Saturday, March 1, 2003, at 01:35 PM, Bob Pasker wrote: > if you try to pass an int whose magnitude is greater than can > be stored in a char (-256/+255), then you will get > objc.error: depythonifying 'char', got int of wrong magnitude > for example, with a table with greater than 255 rows, the following > will fail: > self.theButton.setEnabled_(self.theTableView.numberOfRows()) > but > self.theButton.setEnabled_(self.theTableView.numberOfRows() != 0) > works as expected. But isn't the latter MUCH more clearly expressive of what you're doing? I think the first is the typical C-style "pun" and is an abomination... Cheers! --Chris Ryland / Em Software, Inc. / www.emsoftware.com |