[Pythonmac-SIG] creating PyObjC wrapper for ObjC framework?
has
hengist.podd at virgin.net
Sun Jan 13 19:12:15 CET 2008
On 13 Jan 2008, at 14:24, Ronald Oussoren wrote:
> I keep trying to make it as easy as possible to create Objective-C
> code that is trivial to wrap using PyObjC, although documentation
> and advocacy is rather lacking :-(
Sympathies; know what it's like trying to find enough time and/or
assistance for everything you'd like to see done. Don't suppose
there's any PyObjC users out there with a bit of spare time available
who could come to your aid?
>>>> Don't try to convert the NSError to an exception, that would make
>>> your wrapper complete different from other wrappers and hence more
>>> likely to cause confusion for users.
>>
>> Okay. (Is this something that's changed since PyObjC 1.x, or is my
>> memory just playing tricks?)
>
> That's probably just your memory. NSException's are bridged to
> Python exceptions, that may cause the confusion.
Quite likely. So proper procedure is to return an NSError and leave
the Python code to do whatever it wants with that information (perform
error recovery, raise a Python exception, etc.), yes? If so, no problem.
Thanks for the advice, and muchos gracias for all your work on PyObjC
2.0
has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
More information about the Pythonmac-SIG
mailing list