At 08:38 PM 5/9/2001 -0500, Ian Bicking wrote:
>Instead of deleting objects, I'm marking them as hidden. So I'm
>creating special thumbnails whenever the hidden attributes of a MK
>object is changed. I'm doing something like this:
> def setHidden(self, hidden):
> if self.hidden() != hidden:
> [create or delete thumbnail]
> GenPiece.setHidden(self, hidden)
>But it seems like this is happening maybe everytime the object is
>created -- like the store sets the hidden attribute via setHidden,
>instead of directly writing the attribute. Is this the case?
>If so, is there some way I can tell if the object is being changed,
>rather than just constructed?
Yes it does use setFoo() to set foo upon reading. In the future I would
like to use readFoo() first and then setFoo() if the "read" is not
available. That way you could customize unarchiving behavior vs. ordinary
In the mean time, you can check self.__mk_initing to see if you are being
created. Let me know if that works fo ryou.