Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Manually REPLACEing in a VCX Methods field
Message
 
 
To
07/11/2005 16:51:03
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01065807
Message ID:
01066302
Views:
18
Olaf,

I spent the night digging into the objcode after making changes to the methods and recompiling the classlib I don't find an absolute backlink from objcode to methods. There's one point in objcode that linearly increases as the first method changes length but the the value is 11 bytes less than the actual offset inside the methods memo.

I'm still not convinced that your example is definitive proof one way or the other either. There's three possible scenarios 1) everything is in synch and VFP doesn't have any problems, 2) there is a little bit of discrepency and VFP gets a little off and odd things display in the methods window. 3) there is a lot of discrepency and VFP gives up.

In either 2 or 3 you are at serious risk of completely corrupting the classlib if you Save from the class designer.

The bottom line on manual classlib/form manipulation (and it's always been this)

a) make sure you have adequate backups before attempting manual edits
b) know exactly what/where/how VFP is expecting to see the data in the columns
c) compile the classlib/form after manipulation before attempting to use the designer
d) if you got b wrong and the classlib is blown up see rule a and start over

>> don't believe either one of you. *g*
>Well, that's okay :-)
>
>One more try to convince you:
>
>1. methods and objcode in sync. methods content:
>
>
>PROCEDURE Load
>* the load event
>ENDPROC
>PROCEDURE Init
>* the init event
>ENDPROC
>
>The source code of init is "* the init event" = bytes 56 to 74 (including CRLF).
>
>2. manually change methods memo without changing objcode and no recompile. methods content:
>
>PROCEDURE Load
>* the load event
>* is now longer
>ENDPROC
>PROCEDURE Init
>* the init event
>ENDPROC
>
>Now what's at byte 56 to 74? It's "PROCEDURE Init". And that shows up in the editor when editing the init method...
>
>3. another manual change of the methods memo to:
>
>PROCEDURE Load
>* the load event
>* is now
>ENDPROC
>PROCEDURE Init
>* the init event
>ENDPROC
>
>
>The Editor now shows
>
>URE Init
>* the
>
>as the init method...
>
>If I clear out ObjCode, THEN the editor shows nothing, THEN VFP gives up...
>
>Maybe you'd believe me (us <g>), if I could find the informations in ObjCode memo and modify it so the init method is shown in the load event and vice versa?
>
>Bye, Olaf.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform