Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Property not found error
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01132430
Message ID:
01132473
Views:
12
Randal,

In VFP you need to either drop an instance of a class onto a form at design time or add it at runtime via thisform.AddObject() or CreateObject(). To be a visible component that has GUI interaction you must use thisform.AddObject():
* form.Init()
thisform.AddObject( "oMSM", "MSM" )
Then your button code can:
with thisform.oMSM
   .lds = "..."
   .Synchro()
endwith
Are you sure you want the MSM class derived from Session? That will put all the tables/cursors inside it's own DS and the form won't have direct access to them. If your form itself is set to PrivateDataSession then all the tables/cursors are local to the form.

>hi,
>I need help in this code.
> In my main.prg i have the follwing piece of code
>
>DEFINE CLASS MSM as Session OLEPUBLIC
>lds=""
>rds=""
>
>
>function synchro
>....some code
>endfunc
>..some more functions
>enddefine
>
>I have a form which has got a command button. The code behind for this button is:
>
>thisform.lds= "C:\....\comp.dbc"
>thisform.synchro()
>
>
>when i run the form i get the foll. error
>
>Property LDS not found
>Property SYNCHRO not found
>
>Why Am i getting this error. Im new to Object oriented VFP.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform