Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Property with Property_Assign to all classes
Message
 
 
To
31/08/2000 12:23:38
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00411336
Message ID:
00411368
Views:
14
>>>>>Correction:
>>>>>Tray Walpole. Sorry for misspelling your last name, Tray
>>>>>
>>>>>>Hi everyone,
>>>>>>
>>>>>>Using Trey Weapole
>>>>
>>>>Now you got the first name wrong :)
>>>>
>>>>Quick way: hack your base class .VCX file.
>>>>BE VERY CAREFUL DOING THIS - BACK UP FIRST TO BE SAFE
>>>>
>>>>USE mybase.vcx
>>>>REPLACE reserved3 WITH ALLTRIM(reserved3)+"lenabled Description of lenabled" ;
>>>>ššFOR ALLTRIM(reserved1) == "Class"
>>>>USE
>>>>COMPILE CLASS mybase.vcx

>>>
>>>
>>>Trey,
>>>
>>> This would add description of the new property to all classes, right? What about adding property and associated assign method?
>>>
>>> I'm going to try your idea right now.
>>
>>Great, it works!
>
>Cool!
>
>To add the lenabled_assign method do the same thing, except with a "*" in front of the method name. That tells VFP it's a method (and array properties start with "^", BTW)
>
>REPLACE reserved3 WITH ALLTRIM(reserved3)+"*lenabled_assign lenabled Assign method" ;
>ššFOR ALLTRIM(reserved1) == "Class"

>
>and add the procedure to the methods field
>This is the default setting that appears.
>
>REPLACE methods WITH allt(methods)+ ;
>šš"PROCEDURE lenabled_assign"+CHR(13)+CHR(10)+ ;
>šš"LPARAMETERS vNewVal"+CHR(13)+CHR(10)+ ;
>šš"*To do: Modify this routine for the Assign method"+CHR(13)+CHR(10)+ ;
>šš"THIS.LENABLED = m.vNewVal"+CHR(13)+CHR(10)+"ENDPROC" ;
>ššfor reserved1="Class"


Thanks again. I almost finished adding method manually :)
BTW, I noticed, that it inserts in some classes some garbage, like ')' at the top of properties and d or h or some weird symbols at the bottom...
Anyway, it's a random process. Since I look into each class, I delete all this garbage.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform