Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why would you want an app without a READ EVENTS command?
Message
From
07/07/1999 12:50:31
 
 
To
07/07/1999 11:17:10
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00238317
Message ID:
00238376
Views:
18
>Hi,
>
>I've been asked by a client to maintain an app that was created by a former programmer who left their company.
>
>I have always used some sort of app framework, either the free ones, or VPM. With each one of these there is always a main .prg that starts the program, an app object gets created, and the READ EVENTS command gets issued.
>
>In this app I've notice a few things that puzzle me. First off the programmer uses no classes in the project at all. I think that is because he must have just come from the fox 2.x world or something and wasn't used to classes/objects. I certainly don't fault him there because it has taken me quite a while to get used to it myself. Secondly there is no READ EVENTS, instead he creates a login form that is modal and that stays up all of the time behind the other forms that appear. I was surprised to see that as I thought that the read events command was absolutely necessary in vfp. Can anyone tell me why you don't need it or why you might not want it?

The READEVENTS is there to stop the application and wait for an event to happen. A modal form, in a sense, stops the application too.

>
>One other thing I noticed is that on some of the forms the programmer will create a textbox and set the controlsource to a variable that has not been instantiated anywhere, let say it's called "m.lVar", then he'll set the value of that control to false. (m.lvar doesn't get declared anywhere in the program) Then elsewhere on the form, say in a click event of a command button, he would say:
>
>If m.lvar
>        do something
>endif
>
>I didn't know you could refer to var that was not set up as either a public variable, a property of the application object, or a property of the form. In the above situation I have always used if thisform.mycheckboxcontrol.value = .t. . Can anyone tell my VFP lets you do the above and why you might want to do that?

Is he doing a SCATTER MEMVAR before calling the form? This would create PRIVATE variables that would be visible in the form methods.

>
>I have already asked a friend about this whole thing but I wanted to get some further input. Thanks in advance. -Rick
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform