Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Putting code into method at runtime
Message
De
12/12/2008 13:05:05
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01366206
Message ID:
01366990
Vues:
13
>>>Yes, except I would better create a reference to the object without macro, e.g.
>>>
>>>try
>>>    loGrid = evaluate('THIS.PARENT.' + lcGridName)
>>>    BINDEVENT(loGrid,"MouseEnter",THIS,"MouseEnter")
>>>catch to loEx
>>>endtry
>>>
>>
>>Why?
>
>Call it macro idiosyncrasy

Call it ease of debugging. You can put a breakpoint after the TRY and see whether loGrid is the object you thought it would be.

I'd actually rather

loGrid=getPem(this.parent, "lcGridName")

because that doesn't run the expression evaluator at all (as eval() must do), it queries the object directly.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform