Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Visual Class from Prg base Classes
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00596920
Message ID:
00596947
Views:
27
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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform