Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which type of class to use?
Message
De
30/12/2004 09:17:32
 
 
À
30/12/2004 08:54:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00973101
Message ID:
00973253
Vues:
17
Hi Tracy,

I did not read your message carefully enough. As some other UT members have mentioned, the session class is most likely best suited for your need. The empty class can only be created programmatically, so you will not see it in the list of available base classes in any of the designers.




>If I create the class manually using the ide by: 'create class' with nothing else in the command line in the command window, when the new class window pops up 'empty' is not available in the dropdown box. Is it only available by using the full command line e.g. 'create class sysinfo of atisysinfo AS EMPTY' ? When I try that I get a 'classname is invalid' message. I have never used the empty class, where is it?
>
>
>>Hi Tracy,
>>
>>my rule of thumb is that if no class has at least some of the functionality built in that I need, I use the EMPTY class.
>>
>>>I have a function that is called that does ONE of two possible things based on how it is called:
>>>
>>>1. Creates a table with required basic 'core' records.
>>>2. Adds additional 'detail' records based on the values passed.
>>>
>>>I pass the below values to the function:
>>>
>>>
>>>*:          Usage: =SysInfo(tcgroup, tcsubgroup, tcitem, tcsubitem, tcvalue, tlcreate)
>>>*:     Parameters: tcgroup      c65   - group value i.e. Agency Name/Site Name
>>>*:                 tcsubgroup   c65   - subgroup value i.e. Workstation Name
>>>*:                 tcitem       c65   - item value i.e. User Settings
>>>*:                 tcsubitem    c65   - subitem value i.e. Deleted
>>>*:                 tcvalue      M     - detail value i.e. ON or OFF, etc.
>>>*:                 tlcreate     L     - logical create groups/subgroups/etc or not
>>>
>>>
>>>If tlcreate is passed, then the table is created with certain basic records which allow it to be viewable easily in a treeview. The record is populated based on the values passed in the other parameters.
>>>
>>>If tlcreate is not passed (or passed as false), then the values are being passed which then creates a detail record or overwrites one if the settings have changed for that subitem.
>>>
>>>The table stores system settings such as set deleted, set near, login id, workstation name, hard disk space, memory, etc and is broken down by agency name and workstation.
>>>
>>>It works fine as is, but:
>>>
>>>I want to change this program to a class. Which type of class is best to use for one that will never be visual except when creating the properties during development?
>>>
>>>My idea is to set the value of properties on the class with the values passed to the function now, and then call a method of the class to process those values.
>>>
>>>
>>>THANKS,
>>>Tracy
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform