>>- return the data as array, rebuild the table
>--> would like to do that but no way to pass an array back from a form correct? (it would have to be a property of an object right)
You can not RETURN an array. But beside that there are ways.
No scx'sI create all my forms as a class in a vcx, doing in general the following for calling:
loForm = newobject('form_class','classlib', ...)
loForm.Put(Whatever_I_need,even_Array)
loForm.Show(1)
loform.get(Whatever_I_need,even_Array)
loform.release
loform = .null.
do not need to
return anything from a form.
It has some backdraws like no tables available at design time, but I don't like this anyway.
back referenceAn other way would be to hand the form a back reference
The form calling needs a method like:
PROCEDURE PutDataBack
LPARA taData
external array taData
ENDPROC
*calling picklist is like:
DO FORM PickList.scx WITH THISFORM
PickList.scx: methods:
PROCEDURE INIT
LPARA toBackRef
this.addproperty('goBackRef',toBackRef)
return dodefault()
ENDPROC
PROCEDURE okbutton.click
thisform.goBackRef.PutDataBack(@laData)
ENDPROC
>>- return the data as a string, for example as XML, rebuild from that, a csv string, or a string to a temp csv file will do as well.
>--> probably the "cleanest" going forward if I use this technique in other forms (and easy for another programmer to understand what I am doing)
If you can do that, you can do a
real table too.
HTH
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]