[yast-devel] Replacepoints with python-yui
Hi ! I wonder if/how i can use Replacepoints in python-yui ... createReplacePoint is there, but the ReplaceWidget call seems not implemented in python-yui. And btw: where can i post examples for inclusion into libyui-bindings ? here ? best regards Jan-Simon -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Jan-Simon Möller <dl9pf@gmx.de> [Aug 05. 2008 13:53]:
Hi ! I wonder if/how i can use Replacepoints in python-yui ... createReplacePoint is there, but the ReplaceWidget call seems not implemented in python-yui.
The swig bindings expose whatever is defined in libyui's .h files. And there is no ReplaceWidget() defined in the .h files, only a YUISymbol of that name.
And btw: where can i post examples for inclusion into libyui-bindings ? here ?
Either here or we could set up an area on the opensuse.org wiki. Whatever you prefer. Klaus -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Tue, Aug 05, 2008 at 02:39:17PM +0200, Klaus Kaempf wrote:
* Jan-Simon Möller <dl9pf@gmx.de> [Aug 05. 2008 13:53]:
Hi ! I wonder if/how i can use Replacepoints in python-yui ... createReplacePoint is there, but the ReplaceWidget call seems not implemented in python-yui.
The swig bindings expose whatever is defined in libyui's .h files. And there is no ReplaceWidget() defined in the .h files, only a YUISymbol of that name.
You can copy the implementation from here: YCP_UI::ReplaceWidget, line 786 of http://svn.opensuse.org/svn/yast/trunk/ycp-ui-bindings/src/YCP_UI.cc -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Am Dienstag 05 August 2008 16:35:58 schrieb Martin Vidner:
You can copy the implementation from here: YCP_UI::ReplaceWidget, line 786 of http://svn.opensuse.org/svn/yast/trunk/ycp-ui-bindings/src/YCP_UI.cc
#if VERBOSE_REPLACE_WIDGET replacePoint->dumpDialogWidgetTree(); #endif YDialog * dialog = YDialog::currentDialog(); YWidget::OptimizeChanges below( *dialog ); // delay screen updates until this block is left replacePoint->deleteChildren(); YCPDialogParser::parseWidgetTreeTerm( replacePoint, newContentTerm ); replacePoint->showChild(); #if VERBOSE_REPLACE_WIDGET replacePoint->dumpDialogWidgetTree(); #endif dialog->setInitialSize(); dialog->checkShortcuts(); hmm ... looking at the code i will give it a try , but we probably the *Tree calls need to be fixed first for the python bindings. As both the rebuildMenuTree and rebuildTree fail atm, this *Tree operation migth also fail. I'll try to use it manually and report. Thank you! Best regards Jan-Simon -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
update: import yui factory = yui.YUI.widgetFactory() dialog = factory.createMainDialog() replacepoint = factory.createReplacePoint(dialog) hbox = factory.createHBox(replacepoint) b1 = factory.createPushButton(hbox, "1") b2 = factory.createPushButton(hbox, "2") b3 = factory.createPushButton(hbox, "3") event = dialog.waitForEvent() # push button replacepoint.deleteChildren() vbox = factory.createVBox(replacepoint) b1 = factory.createPushButton(vbox, "1") b2 = factory.createPushButton(vbox, "2") b3 = factory.createPushButton(vbox, "3") dialog.recalcLayout() replacepoint.showChild() event = dialog.waitForEvent() # tada! WORKS ! ;) ! -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Jan-Simon Möller <dl9pf@gmx.de> [Aug 05. 2008 17:21]:
update:
import yui factory = yui.YUI.widgetFactory() dialog = factory.createMainDialog() replacepoint = factory.createReplacePoint(dialog) hbox = factory.createHBox(replacepoint) b1 = factory.createPushButton(hbox, "1") b2 = factory.createPushButton(hbox, "2") b3 = factory.createPushButton(hbox, "3") event = dialog.waitForEvent() # push button replacepoint.deleteChildren() vbox = factory.createVBox(replacepoint) b1 = factory.createPushButton(vbox, "1") b2 = factory.createPushButton(vbox, "2") b3 = factory.createPushButton(vbox, "3") dialog.recalcLayout() replacepoint.showChild() event = dialog.waitForEvent() # tada!
WORKS ! ;) !
Cool, thanks ! Submitted to svn as http://svn.opensuse.org/svn/yast/trunk/libyui-bindings/swig/python/examples/... Klaus -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (3)
-
Jan-Simon Möller
-
Klaus Kaempf
-
Martin Vidner