Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add Tables
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00084113
Message ID:
00085249
Views:
34
Refer to reply to Cetin...

Eric K.
>^_^' One of the possible error is the procedure you put!!
>
>If the text1 object is NOT Inited, there is no Text1 in form at that moment.
>You must fail to change any value on it!
>
>So, Check the event trace and capture the event sequence!! ;P
>
>
>
>>Hi Eric,
>> You mention being unable to save the DE with a form class. Unfortuantely VFP does not allow a form class to be saved with a DE, only form instances(scx's). Not sure why your AddObject("DataEnvironment"... failed at runtime.
>>HTH
>>Ned
>>> As the battle rages on, I seem to be getting nowhere...
>>>
>>>I'm encountering a host of problems with forms. When run as a normal .scx from the project manager myform returns: "The data source for this object must be variable reference"
>>>
>>>use mytable in 0 alias dummy
>>>thisform.Text1.controlsource = dummy.description <-- This line causes the error
>>>
>>>If I comment out this line the form .scx runs normally.
>>>
>>>The following code causes another error when I attempt to use a class with a DE containing cursor1 and the initial selected alias set to cursor1.
>>>
>>>SET CLASSLIB TO vdolib.vcx ADDITIVE
>>>oPlayForm = CREATEOBJECT('test')
>>>oPlayForm.dataenvironment.addobject("cursor2","cursor") <-- Causes unknown member error ie: there is no DE contained in this instance
>>>
>>>BTW - This error is the same with nothing in the data environment prior to saving as class
>>>
>>>I guess I don't understand this error. If I create a form visually with a DE and control sources set(like the wizard), why does it complain it is an unknown member when this form is saved as a class, then created using CREATEOBJECT()? Is this not essentially the same object whether run as .scx or an object created in runtime code? Do I need to oPlayForm.addobject("dataenvironment", "dataenvironment")? I attempted this and got a message saying the object type is invalid for the container. Does this mean the form that was saved as a class does not qualify to contain a DE?
>>>
>>>The score is now, VFP - 1
>>> ERIC - 0
>>>
>>>Eric K.
Previous
Reply
Map
View

Click here to load this message in the networking platform