changeset 555:1d58758689e9

primitivus, wix: fixed bad defaults values for XMLUI class
author Goffi <goffi@goffi.org>
date Sun, 09 Dec 2012 23:25:51 +0100 (2012-12-09)
parents caad23285a38
children 14dcbcdb6222
files frontends/src/primitivus/xmlui.py frontends/src/wix/xmlui.py
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/primitivus/xmlui.py	Sun Dec 09 23:24:53 2012 +0100
+++ b/frontends/src/primitivus/xmlui.py	Sun Dec 09 23:25:51 2012 +0100
@@ -50,11 +50,11 @@
 
 class XMLUI(urwid.WidgetWrap):
     
-    def __init__(self, host, xml_data, title = None, options = [], misc={}):
+    def __init__(self, host, xml_data, title = None, options = None, misc = None):
         self.host = host
         self.title = title
-        self.options = options
-        self.misc = misc
+        self.options = options or []
+        self.misc = misc or {}
         self.__dest = "window"
         self.ctrl_list = {}  # usefull to access ctrl
         widget = self.constructUI(xml_data)
--- a/frontends/src/wix/xmlui.py	Sun Dec 09 23:24:53 2012 +0100
+++ b/frontends/src/wix/xmlui.py	Sun Dec 09 23:25:51 2012 +0100
@@ -31,13 +31,13 @@
 class XMLUI(wx.Frame):
     """Create an user interface from a SàT xml"""
 
-    def __init__(self, host, xml_data='', title="Form", options=[], misc={}):
+    def __init__(self, host, xml_data='', title="Form", options = None, misc = None):
         style = wx.DEFAULT_FRAME_STYLE & ~wx.CLOSE_BOX if 'NO_CANCEL' in options else wx.DEFAULT_FRAME_STYLE #FIXME: gof: Q&D tmp hack
         super(XMLUI, self).__init__(None, title=title, style=style)
 
         self.host = host
-        self.options = options
-        self.misc = misc
+        self.options = options or []
+        self.misc = misc or {}
         self.ctrl_list = {}  # usefull to access ctrl
 
         self.sizer = wx.BoxSizer(wx.VERTICAL)