Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Call a user defined class from within a program
Message
De
09/08/2005 09:48:17
 
 
À
09/08/2005 09:39:12
Bonhomme Sanon
Hercules Software
Pays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01039526
Message ID:
01039531
Vues:
19
I have a class I created called sysinfo that resides in atisysinfo.vcx and is included in the project. I instantiate it like so:

oSysinfo = NEWOBJECT('Sysinfo','ATISysInfo.vcx')

Then I call methods of the class:

osysinfo.bldrecords()
oSysinfo.readinfo()
OSysinfo.saveinfo()

I set properties of the class like so:

osysinfo.tcsubgroup = 'User1'
osysinfo.tcitem = 'User Settings'
osysinfo.tcsubitem = 'Safety Mode'

etc.

Here is an example of launching a report in a window. The form used for the preview window is a class:
IF mpreview

   LOCAL oPreviewForm
   oPreviewForm = NEWOBJECT('PreviewForm', 'Pro32.vcx')

   DO CASE
   CASE viewpoladr
      REPORT FORM poli_adr TO PRINTER PROMPT WINDOW PREVIEWFORM PREVIEW
>After months of inactivity I am confronting now with some problems to come back.
>
>Can someone tell how can I call a class from within a program ?
>
>Help please.
>
>Best regards.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform