On 2/2/11 10:08 AM, Werner F. Bruhin wrote:
> On 02/02/2011 17:51, Paul McNett wrote:
>> On 2/2/11 4:01 AM, Werner F. Bruhin wrote:

>>> 1.  use dDragForm instead of dFrom
>> Um, what's dDragForm?
> Oops, I ment dDockForm also know as wx.AUI:)  BTW, what were the reasons
> to go with wx.AUI over wx.agw.aui?

I wasn't involved in wrapping AUI, so I don't know.

> Or have an alternative(s) datanav's, i.e. have different ones and at the
> appropriate moment the AppWizard asks which one to use - kind of like
> having different templates.

That would be really cool. :)

>>>         - selection at the bottom or top and the search and edit page as a
>>> notebook at the bottom
>> You should design your own form how you want it, but you could still use the
>> generated biz and grid classes...
> Which I need to do for each table, hoped to figure out a way to automate
> it a bit.

Well, what you would do is define your own base classes that give the behavior 
you 
want, and then subclass them.

>>> 2. define for each field a translatable description, HelpText and
>>> ToolTip which are reused whenever I use that field from that particular
>>> bizObj
>> I do this a lot in my code. Make getToolTipText() and getHelpText() methods 
>> in your
>> bizobj, that take as an arg the name of the field. Then instantiate your 
>> controls at
>> the form level like:
>>
>> biz = self.getBizobj(datasource)
>> txt = dabo.ui.dTextBox(self, DataSource=datasource, DataField=field,
>>                           ToolTipText=biz.getToolTipText(),
>>                           HelpText=biz.getHelpText())
>>
> I get the concept but don't see how this works, i.e. how is above
> passing "field" to getToolTipText, is there some magic in biz?

No, I meant ToolTipText=biz.getToolTipText(field)

> I assume in the bizobj I have a dict with field as the key and the texts
> as values, e.g.:
>
> {'name': [_('Country name'), _('tooltip for Country name'), _('helptext
> for Country name')]}

That would be a good way to implement it.

>>> 3. define a default field order per bizObj
>> Do this by rearranging the DataStructure tuple in your biz definition. 
>> AppWizard puts
>> the fields in the order that it finds them in the database. Would be nice to 
>> enhance
>> AppWizard to remove specified fields and allow for rearrangement at that 
>> level, but
>> the key thing to remember is that AppWizard is meant to help you get started 
>> with
>> runnable code. That code is there for you to modify to your desire.
>>
> I tried that but it seems to be ignored.  Will try again, maybe by that
> time I already played around with the grid (moved columns around) and
> the user settings were overriding my source code change.

I really don't know what I was thinking. Changing the DataStructure order will 
indeed 
change the field order in the biz's dataset, because of the 
addFieldsFromDataStructure() call in setBaseSQL(), but the ordering of the 
fields in 
the UI are already written in the UI classes: you have to rearrange them there, 
too.

So this would be another cool AppWizard enhancement, to allow that at the time 
of 
generation. However, like I said before if you are in control of it, just put 
the 
fields in the desired order at the database level first, and that order will 
flow 
forward to AppWizard, DataStructure, and field order in the generated UI.

Paul
_______________________________________________
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/[email protected]

Reply via email to