Decided to try the screencast.  Works great while in the ClassDesigner.py.  
Saved the cdxml as screencast.cdxml
close ClassDesigner.py
open ClassDesigner.py
Use the File->open to open screencast.cdxml

Traceback (most recent call last):
  File "/home/johnf/downloads/dabo/dabo/lib/eventMixin.py", line 97, in 
raiseEve        nt
    bindingFunction(event)
  File "ClassDesigner.py", line 1396, in onOpenDesign
    self.openClass(ff)
  File "ClassDesigner.py", line 509, in openClass
    clsd = self._importClassXML(pth)
  File "ClassDesigner.py", line 450, in _importClassXML
    raise IOError, _("This does not appear to be a valid class file.")
IOError: This does not appear to be a valid class file.

screen.cdxml (saved file)
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<dForm CxnFile="path://PgConnection.cnxml" Width="864" Top="448" Height="469" 
Caption="Dabo Class Designer" designerClass="DesForm" CxnName="PgConn" 
UseSizers="True" Left="500">
        <code>
                <createBizobjs><![CDATA[
def createBizobjs(self):

        class ArcustBizobj(dabo.biz.dBizobj):
                def afterInit(self):
                        self.DataSource = "arcust"
                        self.KeyField = "pkid"
                        self.addFrom("arcust")
                        self.addField("address1")
                        self.addField("company")
                        self.addField("email")
                        self.addField("custno")
                        self.addField("city")
                        self.addField("pkid")

                def validateRecord(self):
                        """Returning anything other than an empty string from
                        this method will prevent the data from being saved.
                        """
                        ret = ""
                        # Add your business rules here. 
                        return ret

        arcustBizobj = ArcustBizobj(self.Connection)
        self.addBizobj(arcustBizobj)
]]>
                </createBizobjs>
                <afterInitAll><![CDATA[
def afterInitAll(self):
        self.requery()
]]>
                </afterInitAll>
        </code>

        <dSizer SlotCount="1" designerClass="LayoutSizer" 
Orientation="Vertical">
                <dPanel sizerInfo="{'BorderSides': ['All'], 'Proportion': 
1, 'HAlign': 'Center', 'VAlign': 'Middle', 'Border': 0, 'Expand': True}" 
designerClass="controlMix">
                        <dSizer SlotCount="2" designerClass="LayoutSizer" 
Orientation="Horizontal">
                                <dSizer SlotCount="2" 
sizerInfo="{'BorderSides': ['All'], 'Proportion': 
1, 'HAlign': 'Left', 'VAlign': 'Top', 'Border': 0, 'Expand': True}" 
designerClass="LayoutSizer" Orientation="Vertical">
                                        <dGridSizer HGap="6" 
sizerInfo="{'BorderSides': ['All'], 'Proportion': 
1, 'HAlign': 'Left', 'VAlign': 'Top', 'Border': 10, 'Expand': True}" Rows="5" 
designerClass="LayoutGridSizer" VGap="5" Columns="2">
                                                <dLabel Caption="Custno" 
sizerInfo="{'RowSpan': 1, 'RowExpand': 
False, 'ColSpan': 1, 'Proportion': 0, 'HAlign': 'Right', 'ColExpand': 
False, 'VAlign': 'Middle', 'Expand': False}" designerClass="controlMix" 
rowColPos="(0, 0)"></dLabel>
                                                <dTextBox 
sizerInfo="{'RowSpan': 1, 'RowExpand': False, 'ColSpan': 
1, 'Proportion': 0, 'HAlign': 'Left', 'ColExpand': 
True, 'VAlign': 'Middle', 'Expand': True}" rowColPos="(0, 1)" 
designerClass="controlMix" DataField="custno" DataSource="arcust"></dTextBox>
                                                <dLabel Caption="Company" 
sizerInfo="{'RowSpan': 1, 'RowExpand': 
False, 'ColSpan': 1, 'Proportion': 0, 'HAlign': 'Right', 'ColExpand': 
False, 'VAlign': 'Middle', 'Expand': False}" designerClass="controlMix" 
Name="dLabel1" rowColPos="(1, 0)"></dLabel>
                                                <dTextBox 
sizerInfo="{'RowSpan': 1, 'RowExpand': False, 'ColSpan': 
1, 'Proportion': 0, 'HAlign': 'Left', 'ColExpand': 
True, 'VAlign': 'Middle', 'Expand': True}" Name="dTextBox1" rowColPos="(1, 
1)" designerClass="controlMix" DataSource="arcust" 
DataField="company"></dTextBox>
                                                <dLabel Caption="Address1" 
sizerInfo="{'RowSpan': 1, 'RowExpand': 
False, 'ColSpan': 1, 'Proportion': 0, 'HAlign': 'Right', 'ColExpand': 
False, 'VAlign': 'Middle', 'Expand': False}" designerClass="controlMix" 
Name="dLabel2" rowColPos="(2, 0)"></dLabel>
                                                <dTextBox 
sizerInfo="{'RowSpan': 1, 'RowExpand': False, 'ColSpan': 
1, 'Proportion': 0, 'HAlign': 'Left', 'ColExpand': 
True, 'VAlign': 'Middle', 'Expand': True}" Name="dTextBox2" rowColPos="(2, 
1)" designerClass="controlMix" DataSource="arcust" 
DataField="address1"></dTextBox>
                                                <dLabel Caption="City" 
sizerInfo="{'RowSpan': 1, 'RowExpand': 
False, 'ColSpan': 1, 'Proportion': 0, 'HAlign': 'Right', 'ColExpand': 
False, 'VAlign': 'Middle', 'Expand': False}" designerClass="controlMix" 
Name="dLabel3" rowColPos="(3, 0)"></dLabel>
                                                <dTextBox 
sizerInfo="{'RowSpan': 1, 'RowExpand': False, 'ColSpan': 
1, 'Proportion': 0, 'HAlign': 'Left', 'ColExpand': 
True, 'VAlign': 'Middle', 'Expand': True}" Name="dTextBox3" rowColPos="(3, 
1)" designerClass="controlMix" DataSource="arcust" 
DataField="city"></dTextBox>
                                                <dLabel Caption="Email" 
sizerInfo="{'RowSpan': 1, 'RowExpand': 
False, 'ColSpan': 1, 'Proportion': 0, 'HAlign': 'Right', 'ColExpand': 
False, 'VAlign': 'Middle', 'Expand': False}" designerClass="controlMix" 
Name="dLabel4" rowColPos="(4, 0)"></dLabel>
                                                <dTextBox 
sizerInfo="{'RowSpan': 1, 'RowExpand': False, 'ColSpan': 
1, 'Proportion': 0, 'HAlign': 'Left', 'ColExpand': 
True, 'VAlign': 'Middle', 'Expand': True}" Name="dTextBox4" rowColPos="(4, 
1)" designerClass="controlMix" DataSource="arcust" 
DataField="email"></dTextBox>
                                        </dGridSizer>
                                        <dBorderSizer SlotCount="4" 
Caption="Navigation" 
sizerInfo="{'BorderSides': ['All'], 'Proportion': 
0, 'HAlign': 'Left', 'VAlign': 'Top', 'Border': 0, 'Expand': True}" 
designerClass="LayoutBorderSizer" Orientation="Horizontal">
                                                <dPanel 
sizerInfo="{'BorderSides': ['All'], 'Proportion': 
1, 'HAlign': 'Left', 'VAlign': 'Top', 'Border': 0, 'Expand': True}" 
designerClass="LayoutPanel"></dPanel>
                                                <dPanel 
sizerInfo="{'BorderSides': ['All'], 'Proportion': 
1, 'HAlign': 'Left', 'VAlign': 'Top', 'Border': 0, 'Expand': True}" 
designerClass="LayoutPanel"></dPanel>
                                                <dButton Caption="Next" 
sizerInfo="{'BorderSides': 
['All'], 'Proportion': 0, 'HAlign': 'Center', 'VAlign': 'Middle', 'Border': 
0, 'Expand': False}" designerClass="controlMix">
                                                        <code>
                                                                <onHit><![CDATA[
def onHit(self, evt):
        self.Form.next()
]]>
                                                                </onHit>
                                                        </code>
                                                </dButton>
                                                <dPanel 
sizerInfo="{'BorderSides': ['All'], 'Proportion': 
1, 'HAlign': 'Left', 'VAlign': 'Top', 'Border': 0, 'Expand': True}" 
designerClass="LayoutPanel"></dPanel>
                                        </dBorderSizer>
                                </dSizer>
                                <dPanel sizerInfo="{'BorderSides': ['All'], 
'Proportion': 
1, 'HAlign': 'Left', 'VAlign': 'Top', 'Border': 0, 'Expand': True}" 
designerClass="LayoutPanel"></dPanel>
                        </dSizer>
                </dPanel>
        </dSizer>
</dForm>

-- 
John Fabiani

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to