Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SCATTER in a COM Object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00834954
Message ID:
00835784
Vues:
23
>Larry,
>
>Not totally sure I understand. Could you elaborate a bit?
>
>Thanks

Kevin,
Basically the return object would look something like this:
define class cusReturn as custom
dimension apropnames[1]
apropnames[1] = (space(0))
npropnum = 0

procedure AddFieldProps
lparameter tcfieldname, tufieldvalue

if THIS.AddProperty(tcfieldname, tufieldvalue) then
   if empty(THIS.apropnames[1]) then
      THIS.apropnames[1] = tcfieldname
   else
      local narrlen
      narrlen = THIS.npropnum+1
      dimension THIS.apropnames[narrlen]
      THIS.apropnames[narrlen] = tcfieldname
   endif
endif

endproc

procedure npropnum_access
return alen(THIS.apropnames,1)
endproc
enddefine
On the outside, you could access the array like this:
local lox, lcproperty, luvalue
lox = * get return object *
for lxx = 1 to lox.npropnum
   lcproperty = 'lox.' + lox.apropnames[lxx]
   luvalue = evaluate(lcproperty)
endfor
HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform