Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why is menu options data open exclusive not saved?

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
0
0
NL
Hi!
Quit often I need in developping project the need to open tables exclusive.
So I ticked the appropriate checkbox in the options menu.
Quit often after I ran an application in develop-environment/mode it appears that the checkmark is 'unticked'.
Any idea why?
TIA
-Bart
 
Hi Mike,
That must be the case.
My app is multiuser.
I would have expected that the options-setting should apply after any custom application quits.
Anyway thanks for helping me.
-Bart
 
Bart,

I would have expected that the options-setting should apply after any custom application quits.

No, that's not the case. If you run your app in the development environment, any changes your app makes will still apply after it finishes.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thanks again Mike,
I will update my 'main.prg' with cleanup code which restores all settings etc. as wanted in de developers environment.
-Bart
 
Bart,

One other thing to note (maybe you know this already) is that a setting you "tick" in the "Tools, Options" window will not stick the next time you start VFP unless you've clicked the "Set As Default" button on the Options window.

Teresa
 
See teresas remark. Also these settings are only set at startup, if you or any program changes them the options dialog just refelcts the actual settings. All these years and you still learn some very basic basics...

There is a _set class in ffc\_environ.vcx helping to set and reset settings:

Code:
o = createobject("_set","exclusive","off")

Now set exclusive will be off and the tick in the options dialog is gone. Set o = .null. and exclusive will be on again if it was before creating that object.

If you set all your settings using this class creating objects in the needed scope eg as _screen properties or form properties or local variables, after the objects release the setting will revert back to what it was.

Bye, Olaf.
 
Teresas,
Thanks for pointing to that.
I now have experienced that the changes ocurred by running my app as developer.

Olaf,
I've never thought about the environmentclass.
Do you advice to use this class in programs or just developmode.
Also agreed, working since the late 80' with databases;
dBaseII, III, III+, Clipper VFP 3,6,8,9.
And still learning every day.....
(But also quit often forgot what was learned <S>)

-Bart
 
How would it make sense to use the _set class in development mode only? If you put it in your code, it's in your code. It's a bit oversized for the job it does and you'd have an object for each setting you change. But it reliably set's the setting back to what it was.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top