Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Severe situation on bug
Message
From
30/07/2001 06:26:17
 
 
To
30/07/2001 01:44:48
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00537068
Message ID:
00537102
Views:
36
Hi!

The code your sent works ok for me - in both cases I have only ShowMessage1 messagebox. NT SP6, VFP 6.0 SP3. How to run it? Maybe it is depended on the default VFP settings, like SET ANSI or SET EXACT?

>Here is the simulation code. Try it on your own. You'll be amazed. Or, maybe someone knows why this is happening like that.
>
>Basically, the facts are like this. If you run the same approach in a non class environment, it'll work. No matter if the error is from a COUNT or from a SELECT or anything else. It will always work. If you put the same code within a class environment such as the following code, you'll see that the SELECT line, if you switch the commented lines will work but the COUNT will create a problem.
>
>
>loProcess=CREATE('FournierTransformation')
>loProcess.ShowMessage()
>
>DEFINE CLASS FournierTransformation AS Custom
>
>FUNCTION ShowMessage
>loProcess.ShowMessage2()
>MESSAGEBOX('ShowMessage1')
>ENDFUNC
>
>FUNCTION ShowMessage2
>COUNT FOR IRegion=lnRegion
>*SELECT * FROM CONTACT WHERE IRegion=lnRegion INTO CURSOR TEMP
>MESSAGEBOX('ShowMessage2')
>ENDFUNC
>
>FUNCTION Error
>PARAMETER nError,cMethod,nLine
>RETURN TO ShowMessage
>ENDFUNC
>
>ENDDEFINE
>
>
>That code will show ShowMessage2 and ShowMessage1.
>
>Comment COUNT line and uncomment SELECT line and you'll get ShowMessage1.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform