Re: [Pyobjc-dev] Bridging NSMutableString, a compromise
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-02-07 21:21:22
|
On Friday, Feb 7, 2003, at 21:53 Europe/Amsterdam, bb...@ma... wrote: > On Friday, Feb 7, 2003, at 15:29 US/Eastern, Just van Rossum wrote: >> We're making this way to hard for ourselves. This weakref idea is an >> attempt to try to hide a flaw in Cocoa (that some objects don't incref >> an object while still storing a reference; it's a poor man's weak ref >> scheme and it sucks). It will be hard to do right. It is easy to work >> around in Python code. Let's make it a FAQ and move on. > > Huh? > > The weakref idea was to take advantage of the callback that happens > when the object is finalized such that the object could be > 'unbridged'. If we can receive notification from Python of when the > Python side of the bridge is done with the PyString, the bridging of > the NSString<->PyString can be broken, the NSString side of things can > leave on in its unbridged state, and nothing gets lost. I'm not entirely sure what you mean here. Do you want to create a NSString subclass for proxying Python strings that somehow goes in 'native' mode if Python code no longer references the string? I think that this adds unnecessary complicated code to the bridge. Is someone working on the subclass of unicode as propased by Just? Having an initial version of this would get us going forward again, the current discussion seems to center around misunderstandings :-). Ronald |