Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query on Scatter Name ObjName
Message
From
06/05/2002 05:08:59
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00652923
Message ID:
00652992
Views:
29
Gerard,

Scatter memvar && retrieves all fields into memory variables
scatter fields f1, f2 && rerieves f1 and f2 into memvars f1, f2 and does not release the other memvars

however
scatter memo name obj && creates ONE object obj with all the fields as members
scatter fields f1, f2 memo name obj && redefines obj with two members and contents f1, f2

the only ways I see are

(1)
scatter memo name obj
...
obj.f1 = Table.f1
obj.f2 = table.f2

(2) continue using scatter memvar

(3)
scatter memo name obj
...
scatter memo name obj && ie reread the whole record


>Gregory,
>My problem is not the memo fields but the fact that if I issues a
>1) Sactter Namd Myobj, all fields get into MyObj
>
>2) If I then issue a Scatter Fields Myfield6,MyField7, only 2 fields end up in the object.
>
>(i.e. Wait Window MyObj.Myfield1 generates an error
>
>
>
>Previously , in FPW, I I issued two commands:
>Scatter Memvar
>Scatter Fields MyField6,MyField7 Memvar
>
>There was no problem with Wait Window m.MyField1
>
>I'm wondering is there a workaround for this using Scatter Name
>
>Regards,
>Gerard
>
>
>__________________________________________________
>
>
>
>>>Hi.
>>>I'm currenlty rewriting an App from 2.6 to VFP.I doing so, I'm retaining as much of old code as possible but 'Objectifying' it.
>>>
>>>I have used a lot of Scatter Memo memvar and am now replacing these commands with Scatter Nmae ObjName. I've run into the following problem:
>>>
>>>Using Scatter Memo
>>>If I have a file with say 5 fields (MyField1/2/3/4/5) and two commands in a program, say ,
>>>Scatter Memo memvar
>>>Scatter Fields MyField1,MtField2,Myfield3
>>>(This leaves contents of MyField4 and MyField5 intact
>>>
>>>However , in VFP, if I do :
>>>Scatter Name MyObj
>>>Scatter Fields MyField1,MyField2,MyFields3,
>>>then .. MyField4 and MyField5 are invalid.
>>>
>>>(For this particular project I want to continue using Scatter, rather than Views)
>>>
>>>Does anybody know a way arounf this and retaining the Scatter Myobj command?
>>>
>>>Regards,
>>>
>>>Gerard
>>
>>Gerard,
>>
>>scatter memo name MyObj
>>
>>takes the memo fields as well (if I understand correctly what you're after)
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform