I have read a few posts about Form.DEClass and .DEClassLibrary properties, but I could not find any sample code to see how it actually works, programmatically. As an example, I have (all in code) created a Form instance where I define the DataEnvironment class, and related library file, I intend to use:
After creating an instance "MyForm_1" of the Form, I was able to intercept all its expected events, but only the Init of MyDEClass (with no Destroy). And I keep getting error 1734 whenever I try to reference MyForm_1.MyDE_1 (or .MyDE_, .MyDEClass, .MyDEClass1, .DataEnvironment) in MyFormClass.Load event, as a matter of fact I cannot see any object contained in MyForm_1!
Is there anything wrong that I am doing or something else that I need to do?
Thanks in advance,
Dario
Code:
DEFINE CLASS MyDEClass AS DataEnvironment
[indent]Name = "MyDE_"[/indent]
ENDDEFINE
DEFINE CLASS MyFormClass AS Form
[indent]DEClass = "MyDEClass"[/indent]
[indent]DEClassLibrary = "MyOwnClasses.prg"[/indent]
[indent]Name = "MyForm_"[/indent]
ENDDEFINE
After creating an instance "MyForm_1" of the Form, I was able to intercept all its expected events, but only the Init of MyDEClass (with no Destroy). And I keep getting error 1734 whenever I try to reference MyForm_1.MyDE_1 (or .MyDE_, .MyDEClass, .MyDEClass1, .DataEnvironment) in MyFormClass.Load event, as a matter of fact I cannot see any object contained in MyForm_1!
Is there anything wrong that I am doing or something else that I need to do?
Thanks in advance,
Dario