Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Application Object Best Practices
Message
De
24/07/2011 21:09:07
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Application Object Best Practices
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MySQL
Application:
Desktop
Divers
Thread ID:
01519029
Message ID:
01519029
Vues:
212
Hi Experts,

I have a question re best practices on creating an Application Object.

Should objects coming from say a Connections Manager or Forms Manager be a member object of - already instantiated - by the Application Object like so:
oApp = CREATEOBJECT ("myApplicationClass")     --> also instantiates oFormsMgr, oConnMgr
oApp.oFormsMgr.MyMethod()
oApp.oConnMgr.SomeOtherMethod()
or can exists 'stand-alone', like so:
oApp = CREATEOBJECT ("myApplicationClass")    

IF NOT oApp.Connect()
    MESSAGEBOX( 'Unable to connect' )
    ** do whatever else
ENDIF

PROCEDURE Connect
  LOCAL llResult
  oConnMgr = CREATEOBJECT( 'myConnectionMgr' )
  llResult = oConnMgr.Connect()
  RETURN lnResult
Thanks in Advance
Dennis
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform