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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only