Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Repeated calls to custom class method causes Page Fault
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00184056
Message ID:
00185251
Views:
31
OOPS! It seems that I have mislead myself. I am running Visual FoxPro 6.0, with the latest service pack installed. By recreating the class one method at a time, I have narrowed the problem down to one of two things.

1) The class library has become corrupted.
2) In creating _assign methods, it appears as though
I have caused a recursion in which the _assign method
actually calls itself. This seems to have filled the
stack buffer, which subsequently caused the Invalid
Page Fault.

My conclusion, however valid, is that it seems somewhat safe to
set the value of a property other than the one that triggers
the _assign event during the _assign event execution, but
re-assigning the same property value triggers somewhat other
than the desired results.

I wanted to check the datatype being passed in, and correct it
if possible. Is there a safe way of doing this?

Thanks for you help.
Randy


>What version of VFP? Do you have the latest SP installed?
>
>>I have created a custom class to return html code as text for an input tag for use in creating html pages for a web server.
>>
>>I'm sure I could find a class that does this job for me, or I could use standard VFP classes to produce the code and save them as HTML. But this is a learning excersize as well, and I'd sure like to know where I screwed this up.
>>
>>OK, I create an object from the class as such:
>>
>>oText1 = CreateObject("HtmlClass.Input") && create an instance
>>oText1.Type = "TEXT" && Assign input tag type
>>oText1.Text = "Text Value" && assign input tag value
>>oText1.FieldName = "TEXT1" && assign input tag name
>>? oText1.Html() && returns the html code for the complete tag
>>? oText1.Html() && CAUSES AN INVALID PAGE FAULT
>>
>>Now for the great part of the excersize: It naturally causes VFP to unload, AND it causes a memory leak. When I restart VFP a few times and do the above, the computer will no longer have enough memory left to load _any_ applications, and I am forced to restart the machine.
JMB Multimedia--creators of top-quality database-driven web sites and multimedia presentations.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform