Re: Trellis on_commit and Performers

"Sergey Schetinin" <[email protected]>
Newsgroups gmane.comp.python.peak
Message-ID <[email protected]>
> Nice.  A very elegant solution.

Thanks.

> One minor issue: there will be a circular
> reference between the freeze manager and the top-level window.  Dunno if
> that's really a problem, though.

When wx windows are destroyed they do __dict__.clear(), so that would
get rid of the reference. And while window is live, a reference is OK
anyway.

> or polling to pull such events from the queue.  Of course, I suppose that wx
> might do it inside of certain calls, but hopefully this is documented if so.
>  :)

Exactly, but relying on wx consistency can be risky. Also, who knows
what workarounds are in work on different platforms? I really hope at
least SetSize followed by an immediate GetClientSize works all of the
time.


>> I completely missed the [dis]connectors of @maintain rules, this
>> really starts to look like a solution. Thanks a lot, your help is
>> invaluable. I'll report on how this works out.
>
> I didn't think of it earlier because I not only forgot they were there, but
> I also forgot I'd made them able to safely do trellis-level changes.  :)

Something is odd with them though. Following test prints "maintain" three times.

class Test(trellis.Component):
    @trellis.maintain
    def value(self):
        print 'maintain'

    @value.connector
    def _watch(self, sensor):
       pass

    @value.disconnector
    def _unwatch(self, sensor, key):
        pass


t = Test()



-- 
Best Regards,
Sergey Schetinin

http://s3bk.com/ -- S3 Backup
http://word-to-html.com/ -- Word to HTML Converter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.