dabo Commit
Revision 5018
Date: 2009-02-04 12:19:38 -0800 (Wed, 04 Feb 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5018

Changed:
U   trunk/dabo/ui/uiwx/dPageFrameMixin.py

Log:
Added a *kwargs argument to dPageFrame.appendPage() and .insertPage(), which 
will get sent along to the constructor of the Page.



Diff:
Modified: trunk/dabo/ui/uiwx/dPageFrameMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPageFrameMixin.py       2009-02-02 19:26:02 UTC (rev 
5017)
+++ trunk/dabo/ui/uiwx/dPageFrameMixin.py       2009-02-04 20:19:38 UTC (rev 
5018)
@@ -138,20 +138,26 @@
                return ret
                
        
-       def appendPage(self, pgCls=None, caption="", imgKey=None):
+       def appendPage(self, pgCls=None, caption="", imgKey=None, **kwargs):
                """ Appends the page to the pageframe, and optionally sets
                the page caption and image. The image should have already
                been added to the pageframe if it is going to be set here.
+
+               Any kwargs sent will be passed on to the constructor of the 
+               page class.
                """
-               return self.insertPage(self.GetPageCount(), pgCls, caption, 
imgKey)
+               return self.insertPage(self.GetPageCount(), pgCls, caption, 
imgKey, **kwargs)
                
        
        def insertPage(self, pos, pgCls=None, caption="", imgKey=None,
-                       ignoreOverride=False):
+                       ignoreOverride=False, **kwargs):
                """ Insert the page into the pageframe at the specified 
position, 
                and optionally sets the page caption and image. The image 
                should have already been added to the pageframe if it is 
                going to be set here.
+
+               Any kwargs sent will be passed on to the constructor of the
+               page class.
                """
                # Allow subclasses to potentially override this behavior. This 
will
                # enable them to handle page creation in their own way. If 
overridden,
@@ -172,7 +178,7 @@
                                from dabo.lib.DesignerXmlConverter import 
DesignerXmlConverter
                                conv = DesignerXmlConverter()
                                pgCls = conv.classFromXml(xml)
-                       pg = pgCls(self)
+                       pg = pgCls(self, **kwargs)
                if not caption:
                        # Page could have its own default caption
                        caption = pg._caption



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to