Re: dwgui now passes test_shake.py

Robin Becker <[email protected]> Sun, 3 Nov 2002 10:38:24 +0000
Newsgroups gmane.comp.python.anygui.devel
Message-ID <[email protected]>
In article <[email protected]>, Joseph A Knapka
<[email protected]> writes
>Robin Becker wrote:
......
>> 
>> How are backends supposed to handle this kind of deferred property
>> setting?
>
>It should be handled by push/pull magic, unless that's been
>changed. If the front end pushes a geometry to the backend
>before the native widget exists, the backend should just
>ignore it. The frontend proxy still has the proper values
>in its state, so when the widget is created the wrapper
>does "self.proxy.push()" to push everything, and the widget
>gets the right geometry.
>
>That worked on mswgui last time I looked.
>
>Cheers,
>
>-- Joe
Yes I think I understand that the proxy already knows the values, but
mswgui only has enterMainLoop do self.proxy.push()

I had thought that this should be done in the backend widget factory,
but mswgui doesn't set self.widget there, it returns the widget to the
create method. So after inspection of Wrappers.AbstractWrapper.create 

        if application().isRunning():
            if not self.widget:
                self.widget = self.widgetFactory(*args, **kwds)
                self.widgetSetUp()


it seems that this should be done in widgetSetup, but that causes
recursion via setContainer. 

It seems that an unconditional push isn't right. At the very least
container needs to be removed from the list so what seems to work is

                self.proxy.push(blocked=['container'])

-- 
Robin Becker


-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com