Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_assign with scatter name
Message
From
10/04/2007 13:59:29
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01214016
Message ID:
01214058
Views:
7
>Hi,
>
>I wonder if I got the _Assign scheme.
>
>I have a business object (bz) that wraps a table. bz has a property oData that I use to access the "current record" of the table via
>
>scatter name this.oDAta
>
>Now I wrote an "assign" method in bz:
>
>procedure oData_Assign
>parameter oData
>this.oData= oData
>...
>wait window oData.Field1
>
>and in Init I have
>
>select <table>
>scatter name this.oData blank
>
>The Assign method gets fired alright, but I get
>
>FIELD1 is not a property
>
>What am I missing?

You could change your code to following:
Init event
select yourtable
scatter name oTemp blank
this.oData=oTemp
Assign method in bz:
procedure oData_Assign
parameter oData
this.oData= oData
if type(this.odata)<>'O'
  return
endif
...
wait window oData.Field1
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform