Method/Procedure WhatEver loObject = CreateObject('Set_Prop','Talk','OFF/ON') ..... EndProc Replaces: Method/Procedure WhatEver lcTalk = Set('Talk') Set Talk OFF/ON ..... Set Talk &lcTalk EndProc Define Class Set_Prop as Custom cProperty = '' cSetting = '' Procedure Init(tcProperty,tcSetting) This.cProperty = tcProperty This.cSetting = Set(tcSetting) Set &tcProperty &tcSetting EndProc Procedure Destroy() Local lcProperty, lcSetting lcProperty = This.cProperty lcSetting = This.cSetting Set &lcProperty &lcSetting EndProc EndDefine>And then I need to remember the name of this class, how to call it, etc. What if somebody wants the class which sets/restores TALK ON instead of OFF? Create another class, or add two methods to SETTALK class (or one method and pass the parameters), remember methods names, etc... Sure you can do things this way, but for such simple cases, IMHO, it is not worth it. But that's just me... :)
>>>>Procedure ?? >>>> lcTalk = Set('Talk') >>>> Set Talk Off >>>> ......... >>>> Set Talk &lcTalk >>>>EndProc >>>>