Re: [Pyobjc-dev] How to pass an ObjC object as the contextInfo of an
Brought to you by:
ronaldoussoren
From: Luc H. <lu...@ho...> - 2007-07-25 12:12:35
|
On 25 juil. 07, at 13:30, Ronald Oussoren wrote: > You cannot pass an arbitrary object as a contextInfo, only integers > or None. This limitation is present because it is impossible to get > memory management correct if you pass arbitrary objects. That's what I suspected, thanks for confirming. > One way to work around this is to have an instance or global > variable that stores a mapping from the integer to the object that > you really wanted to pass. And that's actually how I did it. Not as clean as directly passing the object, but at least it works. Thanks for the help. -- Luc Heinrich |