Nate Lowrie wrote:
> On 6/19/07, Paul McNett <[EMAIL PROTECTED]> wrote:
>> Nate Lowrie wrote:
>>> Can I use a Biz Object without adding it to a form using
>>> Form.addBizobj()? Furthermore, what is required as far as application
>>> setup is concerned? I know I can add the connection file to the
>>> application, but am not sure if I need to run App.start() first or if
>>> I can do it after App.setup().. Is there a way to use the Dabo db and
>>> biz layers without declaring an Application?
>> In general, you want to have a dabo application instance no matter what.
>> However, it should be possible to run your app without it if you really
>> want to.
>
> The thing is that I don't want an application instance running because
> this is a library module. Will it hurt things if I use these
> connections and bizObjects and then a completely separate dabo
> Application (i.e. the App doesn't know about them).
Ok, I understand. No, it shouldn't hurt anything. In fact, it should
work great, and self.Application should even work, assuming that the
dabo app using the library modules has defined an app object.
>> Yes, you can use a bizobj without adding it to a form.
>>
>> Here's a rough idea of what you'd need:
>>
>> {{{
>> import dabo
>> import myBizobjs
>>
>> con = dabo.db.dConnection(connectInfoDict)
>> biz = myBizobjs.MyBizobj(con)
>> }}}
>
> Just out of curiosity, is there anyway to create a connection based on
> a cnxml file without going through the App?
try:
{{{
import dabo
from dabo.lib.connParser import importConnections
con = dabo.db.dConnection(importConnections("my.cnxml"))
print con
}}}
--
pkm ~ http://paulmcnett.com
_______________________________________________
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]