* Example of code that will decide data path on the fly
>lParameters tcDBCNAme
>close all
>oApp = createobject("myapplication")
>oApp.cDBCFullName = getdir()+oApp.cDBCName
>do form myform name oApp.oTopForm linked
>*....
>*read events
>
>
>define class myApplication as Custom
> cDBCName = "mydbc.dbc"
> oTopForm = .NULL.
> cDBCFullName = .NULL.
>enddefine
>
>
>*** myForm is based on this form class
>*!* DEFINE CLASS mybaseform AS form
>*!* DoCreate = .T.
>*!* Name = "mybaseform"
>*!* dataenvironment = .F.
>*!* PROCEDURE Init
>*!* with thisform.dataenvironment
>*!* .closetables
>*!* thisform.setall ("Database", ;
>*!* oApp.cDBCFullName,"cursor")
>*!* .opentables
>*!* endwith
>*!* ENDPROC
>*!* ENDDEFINE
>Notice baseform class has a property "dataenvironment" that would also let this work with
>oApp.oTopForm = createobject("myForm",createobject("mydataenvironment"))
>with slight modification in form.init (but as I get your developers add DE).
>Cetin
Cetin,
the developers doesn't add DE to a form, but create forms in their project as a normal form, but they have setted the Template Class Form property (in Options Tabbed Dialog) to my form class.
In the class I haven't the DE because the button on toolbar is disabled (so another maybe can be: Can a form class has the DE ?), when you create a form for your project, instead, DE exist and the button is enabled.
hope my poor english doesn't create fog around the problem.
bye.
RenatoRenato Bertuol (EMail:renato.bertuol@elmec.it
Homepage:www.geocities.com/SiliconValley/Horizon/3216)
Elmec Informatica (URL www.elmec.it)