Re: [Pyobjc-dev] Auto bridging instances by conversion
Brought to you by:
ronaldoussoren
From: <bb...@ma...> - 2003-02-03 19:25:11
|
On Monday, Feb 3, 2003, at 14:15 US/Eastern, David Eppstein wrote: > Shouldn't the following work? I get an exception, str has no > setString_ method... I was hoping to use NSMutableString for my > testing of int undo handling, since it is simpler to set up than the > NSTableView method where I ran across the int issue, but I guess I'll > have to look for something else... > > ... test case deleted ... First, thank you for the test case. That particular behavior is expected (but maybe not correct-- your test case nicely summates what is currently being debated in the rest of this thread). The bridge automatically converts any instance of NSString going from ObjC->Python to a Python String. End result is this... self.string = NSMutableString.stringWithCapacity_(20) ... causes self.string to be a Python string [likely of length 0]. b.bum |