Re: [Pyobjc-dev] pyobjc vs. CoreData bug
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2005-10-05 07:23:37
|
On Wednesday, October 05, 2005, at 00:54AM, Bill Bumgarner <bb...@ma...> wrote: >There is a bug in PyObjC when used with CoreData. Easy workaround, >fortunately. > >This won't work unless foo is declared as an iVar of bar (bar is a >subclass of NSManagedObject): > > bar.foo = 10 > >It appears that the on-assignment KVC or KVO mechanism isn't firing >unless there is an iVar. That's odd. I'm playing around with NSMetadataQuery in a Twisted app and seem to run into a situation where the automatic mechanism is fireing when it shouldn't: just after the object is dealloced. My workaround was adding a __slots__ definition to the class. Ronald |