Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OverRiding SubClasses at RunTime
Message
From
04/05/1998 18:10:45
 
 
To
04/05/1998 14:54:52
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00096608
Message ID:
00096893
Views:
21
A final recommendation concerns "oPreference", as we've so far put it. It would be best if the preference engine were abstracted, and certainly it'd be best if the preference engine wasn't hanging off a global.

So how aboy this instead:
*-- Form Init()
IF TYPE( "THIS.oPrefernce.BaseClass")= "C"
  FOR EACH oControl in THIS.Controls
    THIS.oPreference.Execute( oControl)
  ENDFOR
ENDIF
Now this makes the form class more reusable. Of course, now we need to make the connection between THIS.oPreference and the preference engine itself, which could also be handled in the Init(), but also consider making that an external process. If you do it in the init(), then the usual way to do that is use a cPreferenceEngine property in an expression like
*-- Earlier in the form Init()
IF !EMPTY( THIS.cPrefernceEngine)
  THIS.oPreference= CREATE( THIS.cPrefernceEngine)
ENDIF
Just kick me if you're there already <s>.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform