diff src/browser/sat_browser/card_game.py @ 500:67a4e8383b70

browser side (XMLUI): XMLUI update to follow core changes: - Dialogs are now managed - FileDialog raise a NotImplementedError, it's not yet possible in Libervia - XMLUIPanel.show is implemented - following core changes, we now create an XMLUI with xmlui.create(...) - WidgetFactory now inherit from GenericFactory - workaround for __getattr__ bug in pyjamas, now createXXX are automaticaly created with inspection
author Goffi <goffi@goffi.org>
date Wed, 13 Aug 2014 14:09:09 +0200
parents 97c72fe4a5f2
children 79fbc20c786b
line wrap: on
line diff
--- a/src/browser/sat_browser/card_game.py	Fri Jul 25 11:43:27 2014 +0200
+++ b/src/browser/sat_browser/card_game.py	Wed Aug 13 14:09:09 2014 +0200
@@ -299,7 +299,7 @@
     def tarotGameChooseContrat(self, xml_data):
         """Called when the player has to select his contrat
         @param xml_data: SàT xml representation of the form"""
-        body = xmlui.XMLUI(self._parent.host, xml_data, flags=['NO_CANCEL'])
+        body = xmlui.create(self._parent.host, xml_data, flags=['NO_CANCEL'])
         _dialog = dialog.GenericDialog(_('Please choose your contrat'), body, options=['NO_CLOSE'])
         body.setCloseCb(_dialog.close)
         _dialog.show()
@@ -381,7 +381,7 @@
                 title = "You <b>win</b> !"
             else:
                 title = "You <b>loose</b> :("
-        body = xmlui.XMLUI(self._parent.host, xml_data, title=title, flags=['NO_CANCEL'])
+        body = xmlui.create(self._parent.host, xml_data, title=title, flags=['NO_CANCEL'])
         _dialog = dialog.GenericDialog(title, body, options=['NO_CLOSE'])
         body.setCloseCb(_dialog.close)
         _dialog.show()