Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OverRiding SubClasses at RunTime
Message
De
04/05/1998 18:10:45
 
 
À
04/05/1998 14:54:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00096608
Message ID:
00096893
Vues:
23
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>.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform