Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating Visual Class from Prg base Classes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00596920
Message ID:
00596947
Vues:
29
Sure you could. I'd tell you but then I'd have to have Larry Miller kill you... Oh! Wait a minute! You're Larry Miller!! :-)

Actually, if you instantiate the prg class you can use the "SaveAsClass" method to create a visual class. Here's the code

Local loCustomObject
loCustomObject = CreateObject("myCustomClass")
loCustomObject.SaveAsClass("larry.vcx", "Larry", "This is Larry's custom class")

Define Class myCustomClass as Custom
cSomeProperty = "SomeValue"
Procedure Init
MessageBox("Here's the Init Method")
MessageBox("Here's the value of cSomeProperty: " + This.cSomeProperty)
MessageBox("Pretty Cool! Huh?")
EndProc
EndDefine


But the problem is that unless myCustomClass is instantiated you can't modify the class named Larry.

So there you go... you learn something new everyday! Now how do I get around this issue?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform