************************************************** *-- Class: SaveSettings *-- ParentClass: custom *-- BaseClass: custom *---Created by: Nadya Nosonovsky *-- Time Stamp: 10/18/05 09:07:11 PM * define class SaveSettings as custom *-- Holds SET TALK setting at initialization. protected cOldSetTalk cOldSetTalk = "" *-- Holds SET NOTIFY setting at initialization. cOldSetNotify = "" *-- Holds the output window at initialization. protected cOldOutputWindow cOldOutputWindow = "" *-- Holds the name of the temporary output window. protected cNewOutputWindow cNewOutputWindow = "" *----Holds Escape settings protected cOnEscape cOnEscape= "" protected cSetEscape cSetEscape = "" name = "SaveSettings" procedure destroy set talk off local ; lcNewOutputWindow, ; lcOldOutputWindow, ; lcOldSetNotify, ; lcOldSetTalk, lcOnEscape, lcSetEscape with this lcNewOutputWindow = .cNewOutputWindow lcOldOutputWindow = .cOldOutputWindow lcOldSetNotify = .cOldSetNotify lcOldSetTalk = .cOldSetTalk lcOnEscape = .cOnEscape lcSetEscape = .cSetEscape endwith if version(5)>=700 set notify &lcOldSetNotify endif set talk &lcOldOutputWindow release windows &lcNewOutputWindow set talk &lcOldSetTalk * Now restore our settings on escape &lcOnEscape if m.lcSetEscape = "OFF" set escape off else set escape on endif endproc procedure init with this .cOldSetTalk = set("TALK") .cOldOutputWindow = set("TALK",1) .cOnEscape = on('ESCAPE') .cSetEscape = set('ESCAPE') if version(5)>=700 .cOldSetNotify = set("NOTIFY") endif endwith return .t. endproc enddefine * *-- EndDefine: SaveSettings **************************************************The purpose of this class is to restore some basic settings that may be changed.