Op Wednesday 12 December 2007, schreef Ed Leafe:
> The form methods (new(), save(), etc.) default to the PrimaryBizobj,
> which in your case would be the parent table. To add a record to the
> child, the code would only be slightly different:
>
> self.Form.new("childDataSource")
>
> ...where "childDataSource" is the name of the child table.
Ok, I did that and it works great.
>
> We could certainly add a time type with a Python type of
> datetime.time, but those are pretty useless for editing. Perhaps it
> would be best to use a Python string?
It doesn't matter much to me. I suppose a string would be the most flexible
solution, but that kind of subverts the purpose of having strong types
anyway... This reminds me of the VB "variant". Maybe use datetime.(date)time
at the bizobj level and represent it with a string in the UI?
> You can usually right-click right on the tree node
> for any object to get the same context menu you would had you right-
> clicked on the design surface.
Great, works like a charm! Now I'm trying to figure out how to save the child
records. Using Dabo has made me realize how much I rely on documentation and
coding by example. It's a very humbling experience indeed... Good thing I got
out of professional software development while I had the chance ;-)
>
> > I also can't save the widths of any of my buttons in the Object
> > Info screen!
> > They always revert to width=80!?!
>
> Are they in sizers? Remember, if they are and the sizer is set to
> Expand, the Width is meaningless, so it won't be saved. If you set
> the Proportion to 0 and Expand to False, then you can manually change
> the size and have it saved in the .cdxml file.
Tried that, it doesn't work.
Here's the XML after I edited it to add explicit widths (which are ignored
without errors). Am I not getting something here? Could there be parent sizer
properties being inherited to these sizers?
<dBorderSizer SlotCount="8" Caption="Nav"
sizerInfo="{'HAlign': 'Center', 'VAlign': 'Bottom'}"
designerClass="LayoutBorderSizer" Orientation="Horizontal">
<dButton
code-ID="dButton-dPanel" Caption="<<< First"
sizerInfo="{'HAlign': 'Center', 'VAlign': 'Bottom', 'Width': 50}"
designerClass="controlMix" Name="btnFirst"></dButton>
<dButton
code-ID="dButton-dPanel-911" Caption="< Prior"
sizerInfo="{'HAlign': 'Center', 'VAlign': 'Bottom', 'Width': 50}"
designerClass="controlMix" Name="btnPrior"></dButton>
<dButton
code-ID="dButton-dPanel-613" Caption="Next >"
sizerInfo="{'HAlign': 'Center', 'VAlign': 'Bottom', 'Width': 50}"
designerClass="controlMix" Name="btnNext"></dButton>
<dButton
code-ID="dButton-dPanel-830" Caption="Last >>>"
sizerInfo="{'HAlign': 'Center', 'VAlign': 'Bottom', 'Width': 50}"
designerClass="controlMix" Name="btnLast"></dButton>
<dButton
code-ID="dButton-dPanel-921" Caption="New (+)"
sizerInfo="{'HAlign': 'Center', 'VAlign': 'Bottom', 'Width': 50}"
designerClass="controlMix" Name="btnNew"></dButton>
<dButton
code-ID="dButton-dPanel-983" Caption="Note (+)"
sizerInfo="{'HAlign': 'Center', 'VAlign': 'Bottom', 'Width': 50}"
designerClass="controlMix" Name="btnNewChild"></dButton>
<dButton
code-ID="dButton-dPanel-316" Caption="Save"
sizerInfo="{'HAlign': 'Center', 'VAlign': 'Bottom', 'Width': 50}"
designerClass="controlMix" Name="btnSave"></dButton>
<dButton
code-ID="dButton-dPanel-77" Caption="Cancel"
sizerInfo="{'HAlign': 'Center', 'VAlign': 'Bottom', 'Width': 50}"
designerClass="controlMix" Name="btnCancel"></dButton>
</dBorderSizer>
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]