Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to dynamically set Valid etc. Propery
Message
De
18/03/2001 23:16:05
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
18/03/2001 22:35:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00486322
Message ID:
00486371
Vues:
12
>>Erik,
>>Thanks for your reply.
>>
>>I dont know what the code is going to be until Runtime, so I cannot pur them into a class beforehand.
>
>So a variations on my second suggestion might work: build a single class that calls a named function (say Validate) in its valid method. At runtime, grab the code from your memo field, write it to a file wrapped in FUNCTION Validate/ ENDFUNC, compile that file, and SET PROC TO your new file. Then your class will call that function in its valid.

Furthermore, since we have the runtime compilation available now, he could write the class code in such a .prg at runtime (or at least the first run) from a template (based on, say, column class) and insert the proprietary column.textbox1.valid code in the class definition, and then while building the grid, assuming we're on fourth column now, something like this:
this.generatecolumnclass(4)
compile col4def.prg
this.addobject('column4','column4class','col4def.prg')
Tricky, but feasible. Specially writing the generatecolumnclass method.

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
Répondre
Fil
Voir

Click here to load this message in the networking platform