Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Public variables
Message
 
To
24/12/1998 11:22:38
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00166872
Message ID:
00170299
Views:
24
Tim,

The third example should not have had the PUBLIC line at all.

Here's the issue about the public var again. I like to run my project by DOing the start up prg and then letting it return to teh command window so I can use the form designer and make changes while the app is running. To do this I declare the Application object's memvar as public and don't issue a READ EVENTS so the start up prg will end but the oApp var stays in scope. Similar to the following;

* Startup.prg
LPARAMETERS llDevopment

IF llDevelopment
PUBLIC oApp
ENDIF

oApp = NewObject("Application","System")

IF NOT llDevlopment
READ EVENTS
ENDIF

* End startup.prg

This way if I DO Startup WITH .T. the var oApp is declared PUBLIC and the startup program termintates after creating the application object. I am returned to teh command window and can use any development tools that I choose while the app is running.

If I don't pass the parameter then the value of llDevelopment is .F. and the var is private (default) and a READ EVENTS is issued.
Previous
Reply
Map
View

Click here to load this message in the networking platform