Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why can't I pass object property by reference
Message
De
02/04/2002 18:26:32
 
 
À
01/04/2002 21:01:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00639771
Message ID:
00640136
Vues:
11
Hi David,

You could try passing a referenced variable then assigning the variable to your objects property.

HTH
Michael Henstock
AWS

>I am attempting to write code to allow one class use another classes' objects.
>
>I have a class bctblhandler that needs to use the methods of another class, tblhandler. bctblhandler has a property, tblhandlerIVN, which stands for for tblhandler Instance Var Name.
>
>so I can say:
>
>obctblhandler.tblhandlerIVN=otblhandler
>
>But I wanted to write a procedure that would allow me to cross reference the two generically. So I wrote:
>
>XrefClass(@obctblhandler.tblhandlerIVN,otblhandler)
>
>procedure xrefclass
>parameters toIVN, tobject
>toIVN=tobject
>
>
>endproc
>
>but this didn't work. When calling it I get, alias obctblhandler does not exist.
>
>so I had to write:
>
>XrefClass('obctblhandler.tblhandlerIVN',otblhandler)
>
>procedure xrefclass
>parameters toIVN, tobject
>store tobject to &toIVN
>endproc
>
>instead.
>
>
>What am I doing wrong? BTW, tblhandlerIVN is not defined as protected or hidden.
>
>TIA
A fish this fine deserves to be a fish nugget styled chunklet.
- Fry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform