Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not the correct method after editing in Class Designer
Message
 
 
To
15/05/2004 15:35:46
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00904216
Message ID:
00904397
Views:
17
Greg,

Sorry there wasn't much on the Wiki, I'd have thought someone would have an example up there.

This seems to work correctly for me:
create classlib testreadwrite
create class test as custom of testreadwrite nowait
aselobj( laClass )
laClass[1].WriteMethod( "mymethod", "*test method", .t. )
* check the method in the CD and then close it

use testreadwrite.vcx
select methods from testreadwrite

* the methods memo contains the code

close data all

modify class test of c:\vfp8app\misc\testreadwrite.VCX nowait
aselobj( laClass )
laClass[1].WriteMethod( "mymethod", laClass[1].ReadMethod( "mymethod" ) + chr(13) + chr(10 ) + "*more method" )

* the new code shows up, close the designer

use testreadwrite.vcx
select methods from testreadwrite

again the changed methos code is in the select result
close data all
Maybe you can explain what you are doing that is different than above.

>I check Fox.Wiki.com, and was vary surprised that the search resulted no entries. I am also surprised that the VFP Help file provides no examples and no clear explination on how to use the method.
>
>The actual problem appears to be a cache issue. I edit the method, close and save the class, then attempt to read the VCX with a SQL Select statement. But all I get is the old method. I even look at the actual VCX as a table in a browser and there too, the old code appears. It is not until I perform a CLEAR ALL that the new code gets flushed to the VCX.
>
>Unforunately, the tool I am creating is neither a Build or Wizard style of tool. But when I tried to use it in the tool, all I get is an empty string.
>
>I guess I have to find someother workaround to this issue.
df (was a 10 time MVP)

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

Click here to load this message in the networking platform