On Oct 14, 2010, at 4:51 AM, Henning Hraban Ramm wrote:
> Consider this snippet:
>
> app = dabo.dApp()
> app.BasePrefKey = 'myapp'
> app.MainFormClass = mainTest
> app.start()
>
> At start the app warns (four times!) that there wasn't a BasePrefKey
> set and constructs one from the file's path.
> That would be fine if I hadn't set BasePrefKey explicitely.
I just ran this code and did not receive any warnings.
Does anyone else see this behavior?
> I mostly use my own Application class in this way and don't want to
> inherit it for every small tool just to set BasePrefKey in its
> afterInit.
It would be easier to simply pass it when you instantiate the app, then:
app = dabo.dApp(BasePrefKey='myapp')
> Would it be possible to change dabo's handling of BasePrefKey, so that
> it's possible to set it directly on the app object?
It's not only possible, it's how it was designed to work. There is a
hierarchy: the Application has a BasePrefKey, but individual forms can have
their own value of BasePrefKey; typically, I use a dot-separated notation:
orderform.BasePrefKey = 'myapp.orderform'
-- Ed Leafe
_______________________________________________
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]