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 (I think?) 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. The only way I didn't get the funky characters is when I put in a chr(12) immediately after the endproc. But then, I didn't get any additional methods after the chr(12)
>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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement