Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_assign with scatter name
Message
 
To
10/04/2007 13:59:29
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01214016
Message ID:
01214120
Views:
8
For some unidentified reason, the _assign method needs
this.oData=oData
if (type("oData")<>"O") or (isnull(oData))
    return
endif
>>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
>

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Reply
Map
View

Click here to load this message in the networking platform