Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding Properties in vfp50
Message
De
25/02/1997 11:27:10
 
 
À
24/02/1997 22:58:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Groupes d'usagers
Divers
Thread ID:
00021280
Message ID:
00021951
Vues:
53
>>>>>>>>Why do I want to add new properties to my object's
>>>>>>>>property list?
>>>>>>>
>>>>>>>To store information that is then available to all methods, objects, code etc. in your form. For example, you might have a property frmIndex which stores the active index of the table showing in a grid. If the user wants to change how the data is ordered (from last name to zip code for example) you store the change to the form property.
>>>>>>>
>>>>>>>HTH
>>>>>>>Barbara
>>>>>>
>>>>>>Does that mean I can use property like switches that I can set?
>>>>>>
>>>>>>Rob
>>>>>
>>>>>Not exactly. Use properties like variables. For instance if you have a property to store the index tag name, (as above), then you would store the active tag in the property.
>>>>>
>>>>>** User chooses to order by Last Name
>>>>>if thisform.cIndex 'LAST'
>>>>> sele NAMES
>>>>> set order to tag Last
>>>>> thisform.cIndex = 'LAST'
>>>>>endif
>>>>>
>>>>>Note that the code is skipped if the value didn't need changing.
>>>>>
>>>>>HTH
>>>>>Barbara
>>>>
>>>>Thanks Barbara for your help...
>>>>
>>>>Rob
>>>
>>>Remember that these properties are available only for the active form, but if you want to add a public properties you should add these properties to your application class.
>>>Refer to Tastrade Application.
>>
>>How do you setup an "Allpication Class" for you application.
>>
>>Rob
>
>
>If you take a look at TASTRADE example, they Created a general application class based on a custom control in TSGEN and based on this class they created a tastrade class.
>
>If you have public variables to be used for all applications add these variables as properties to the main class 'Application Class' such as UserName and if you have public variables to be used only for particular application add it to the subclass 'Tastrade Class'.
>
>In your main prg file create one public variable 'oApp' to run the subclass, so you can refer to all properties you added by using this variable for example 'oApp.UserName, oApp.cDatabase'
>
>I Hope this will help.

Thanks Nabil for your answer...

Do you mean that 'Application Class' is mainly for public variables
or could we say the 'Application Class' is a starting place for the program to begin. Inotherwords,run your program init methods in the
'Application Class'?
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