[Chandler-dev] chandlerdb updated (0.6-94)

Jeffrey Harris jeffrey at osafoundation.org
Tue Apr 10 06:58:16 PDT 2007


> This update makes it possible to defer commit() calls until a block of
> code has completed. For example, in CollectionCanvas.py, I'm using this
> to defer the commit() call made by CreateEmptyEvent() until the entire
> double click
> processing completed:
> 
>         elif self.blockItem.CanAdd():
>             with self.blockItem.itsView.commitDeferred():
>                 self.OnCreateItem(unscrolledPosition)
> 
> This block of code, part of CollectionCanvas._handleDoubleClick() means
> to defer all commit() calls that happen inside it until it completes.
> Then, if any commit() calls happened, the last one is applied.

O frabjous day! Callooh! Callay!

I mean, that's really great.
Jeffrey


More information about the chandler-dev mailing list