Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I hack/modify methods column of vcx?
Message
From
17/04/2002 22:25:32
 
 
To
17/04/2002 22:18:48
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00646138
Message ID:
00646144
Views:
19
Whoops, hit send before I wrote anything last time..

Yes this helps tremendously! Thanks. I will try it. I am confused about one thing however. In my testing when I put a chr(13) at the end of the 'endproc' I ended up with funky characters showing up at the end of my method. Does this work with inserting mutliple methods? When I tried inserting multiple methods, only the first one showed up. I am trying to determine what the proper 'end of procedure' character is.

>>David,
>>
>>Here's how I insert a method into a VCX on the fly. I capture the uniqueid value for the object I want to modify and use a standard UPDATE command. In the snippet below I'm adding code to the Init method of a textbox. I also modify the properties field of the VCX in a similar manner. Hope this helps.
>>
>>CR = CHR(13)
>>TAB1 = CHR(9)
>>--- a bunch of procedural code here
>>
>>lcStr = [PROCEDURE Init]+CR
>>lcStr = lcStr+[WITH THIS]+CR+TAB1+"DIMENSION .aCompanionCtls[1]"+CR
>>lcStr = lcStr+TAB1+[.cClassName = ']+lcClass+[']+CR
>>lcStr = lcStr+TAB1+[.cFormName = ']+lcForm+[']+CR
>>lcStr = lcStr+TAB1+[.cFKName = ']+TRIM(curFkey.parent_key)+[']+CR
>>lcStr = lcStr+[ENDWITH]+CR
>>lcStr = lcStr+[ENDPROC]+CR
>>
>>* Update the vcx
>>UPDATE templib.vcx SET methods = methods+lcStr WHERE uniqueID == curList.uniqueID
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform