Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Understanding _Access methods
Message
De
22/04/2008 10:39:44
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Understanding _Access methods
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01312365
Message ID:
01312365
Vues:
58
Hi All,

Just coding my first _Access method as I found a use for it when using Word automation. Instead of trying to keep a property .ioDocuments up to date when creating a Word instance, I instead tried to use an .ioDocuments_Access() method.

Question: am I supposed to set .ioDocuments within that code or am I supposed to return the reference from that method (or both); I read the "help" file but it did not make it clear.
* ioDocuments_Access()
* first way:

WITH THIS

IF NOT ISNULL(.ioServer)  && Word automation server open etc
   STORE .ioServer.Documents TO .ioDocuments
ELSE
   STORE .NULL. TO .ioDocuments
ENDIF

ENDWITH

RETURN

** second way, return the reference instead

LOCAL loDocuments

IF NOT ISNULL(.ioServer)
   STORE .ioServer.Documents TO loDocuments
ELSE
   STORE .NULL. to loDocuments
ENDIF

ENDWITH

RETURN (loDocuments)
Albert
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform