Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hacking the SCX
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00651635
Message ID:
00651740
Views:
25
David,

I need to programatically write to these method fields .(about 200 forms)
Going through the form designer will not br practacal because I will need to re-run at a later stage also.

Is there any publication which details layout ot the scx memo fields

Regards,

Gerard




>Gerard,
>
>If you misposition stuff in those memo fields you'll render VFP incapable of loading the form back into the designer.
>
>You are better using a builder for the form designer. You can use ReadMethod()/WriteMethod() to read each method, add the text and put it back. My website as a couple of builders on it that should point you in the right direction.
>
>
aselobj( laForm, 1 )
>n = amembers( laMethods, laForm[1], 1 )
>for i = 1 to n
>   if ( laMethods[i,2] $ "Event|Method" )
>      lcCode = laForm[1].ReadMethod( laMethods[i,1] )
>      if ( ! empty( lcCode ) )
>         lcCode = lcCode + chr(13) + chr(10) + "* hi there"
>         laForm[1].WriteMethod( laMethods[i,1], lcCode )
>      endif
>   endif
>endfor
>
>
>If you need to recurse into the contained objects, you can process them when laMethods[i,2] = "Object".
>
>>I have a requirement to Insert lines into the .methods field of the Scx file.
>>
>>That bit is working, but when I go in and Modify the Form, in some of the methods (particularly the Load Event) some of the text is being truncated.
>>
>>If I go back to the Scx file, all the stuff seems to be there ok.
>>
>>After doing a bit of experimenting, It would seem to me that there is some other variable held somewhere which holds either the no. of lines or charcters in some /all of the event method code .
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform