Re: dwgui now passes test_shake.py
Magnus Lie Hetland <[email protected]> Sun, 3 Nov 2002 16:47:46 +0100
| Newsgroups | gmane.comp.python.anygui.devel |
|---|---|
| Message-ID | <[email protected]> |
Robin Becker <[email protected]>: [snip] > >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() Yes, that's what tkgui does too, although I don't quite understand why it's necessary if push is called in internalProd (which is where it *should* be called...) > I had thought that this should be done in the backend widget factory, > but mswgui doesn't set self.widget there, No, the widget factory only returns a widget. > 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. No, widgetSetUp is for setting native event handlers and the like. > 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']) Actually, I added the blocked parameter to deal with this in setContainer itself -- see the setContainer method of ComponentWrapper in tkgui. (tkgui is the back-end I was working on while implementing these things in the front-end, so I think the usage there is semi-representative of my intentions, even though I'm sure things may not be 100% consistent/logical yet ;) -- Magnus Lie Hetland Practical Python The Anygui Project http://hetland.org http://ppython.com http://anygui.org ------------------------------------------------------- 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