Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Manually REPLACEing in a VCX Methods field
Message
From
07/11/2005 03:34:58
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01065807
Message ID:
01065906
Views:
18
>Hi Fabio
>
>>COMPILE CLASSLIB myvcx
>
>Wow, that worked, thanks a lot.
>
>Just in case you know more about this, can you tell me what had objcode (compiled version of methods, right?) got to do with the display of methods code in the class designer?

In synthesis:
VFP uses ObjCode to find the lines of code,
then it uses Methods to have the source code of every line ( ASTACKINFO(,6) )

From the version 8 are changed something, but I have not done the analysis.

try this:
CLEAR
CLEAR CLASS test
clear CLASSLIB test1

CREATE CLASS test OF test1 as custom nowait

TEXT TO initcode noshow
LPARAMETERS param1
* comment1
? "code1"
* TAG
ENDTEXT
aselobj[ax]
ax[1].writemethod('Init',initcode)

? "1"

classsave()

USE test1.VCX
REPLACE FOR objName=='test' AND NOT ISBLANK(Class);
	Methods WITH CHRTRAN(Methods,'PARAM1code1','XXXXXXxxxxx') && this destroy the syntax withou change the lines lenght
USE

? "of course the old compile code work"
=NEWOBJECT("test","test1")
CLEAR CLASS test
*COMPILE CLASSLIB test1

? "but CD show the destroyed code"

MODIFY CLASS test OF test1 METHOD Init
RETURN

PROCEDURE classsave

RELEASE AX
?? ''
ACTIVATE WINDOW (WONTOP())
KEYBOARD '{CTRL+W}' PLAIN
DOEVENTS FORCE
=NEWOBJECT("test","test1")
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform