>Procedure ?? > lcTalk = Set('Talk') > Set Talk Off > ......... > Set Talk &lcTalk >EndProc >>Is there a reason people don't use a class to save & restore settings
>Procedure ?? > loTalk = CreateObject('Save_Talk') > ..... >EndProc && Local variables go out of scope forcing destroy() >Define Class Save_Talk as Custom > cTalk = Set('Talk') > Procedure Init() > Set Talk off > EndProc > Procedure Destroy() > Set Talk This.&cTalk > EndProc >EndDefine >How about: Because I never thought about it? I really like it though. In effect, you are localizing global settings, and that is a good thing IMO. I also think that this might qualify as a good example of the "State" design pattern. I usually prefer the OOP way of doing things, so I'll probably use this technique in the future, especially for restoring global settings and work areas. Thanks for sharing.