Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp50-Appllication Object
Message
De
24/02/1997 11:49:40
 
 
À
24/02/1997 11:38:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Groupes d'usagers
Divers
Thread ID:
00021768
Message ID:
00021807
Vues:
45
>>>>>*** start.prg
>>>>>oApp=createobject('app')
>>>>>
>>>>>Define class app as custom
>>>>> .msgtitle="System Error"
>>>>>enddefine
>>>>>
>>>>>*** some snippet
>>>>>=messagebox("Cannot Proceed",1+16,oApp.msgtitle)
>>>>Thanks Ed..
>>>>
>>>>OK - Does that mean I define a class as "application class"? and
>>>>in that class, have a property called "msgtitle"?
>>>>
>>>>rob
>>>
>>>You define a class as Custom (app is just an appropriate title), and this class may have msgtitle property and any other else you may define, e.g. path to data folder.
>>
>>OK... I get it...
>>
>>Your answers are great and I am learning...
>>
>>Custom, user-defined classes are classes with properties, events, and methods, but with no visual representation.
>>
>>This will be like your starting class or a class where you can put your
>>global stuff??
>>
>>Why will I have a custom class when I can write a prg with functions?
>>
>>
>>Rob
>
>Surely we can use system procedure prg file, and I still use both App class (to use properties) and sysproc (to use functions). Besides obvious not OO approach, prg file can get you in trouble if you have to reference a form inside a function (it's not clearly defined in VFP). So, I even sometimes have one more custom class ('commonmethods') which I insert into appropriate forms.

OK..great...

I understand now why in vfp50 you should use Custom(App) and when to use
sysproc (functions).
This means, I fire (invoke) my App with "App.do()" in my MAIN.prg. Does the app class fire off the rest of the application in the init events in app?

Rob
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform