>Please, HELP! The ReadMethod method does not seem to work for me.
>
>I have created test library in order to try the reading the code of some methods. The only class in this .VCX is a ReadTest class based on Custom. I have added method JustCode with some useless VFP code just for reading purposes. Plus, I have put some meaningless code in the Init event. But executing code bellow returns empty strings despite existence of the code in both requested methods.
>
>set classlib to readtest
>x = createobject("readtest.readtest")
>messagebox(x.readmethod("init"), "Init Code")
>messagebox(x.readmethod("justcode"), "Custom Method Code")
>
>I have read that ReadMethod works only in Visual Classes. But I have not found any other limitations for it. My class is not programmatic, so I assume ReadMethod should work. But it does not.
>
>Any suggestions?
>TIA.
>Dmitriy Zaslavskiy
It supposed to work Ok, if you include source code into compiled executable (check 'Debug Info' in Project Info dialog). If you uncheck this option then you will really get empty string.
Edward Pikman
Independent Consultant