Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Categorizing programs in a project
Message
From
01/05/2005 08:00:11
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
30/04/2005 13:17:24
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01009900
Message ID:
01009988
Views:
13
This message has been marked as the solution to the initial question of the thread.
>Not a bad idea(!!) - I'll create a table for my programs and categorize them with a key. Now, some of the programs have functions. How do I call the functions if they are in a table under a character field? If I call the function from a form, again how would I do that if the function is stored in a table?
>
>Thanks!
>
>Paul

I think that would require an additional field. Since you want to run the content listed in the table, I think you might consider, for a start, the following fields:
Filename - name of PRG, form, classlib, menu
Class - name of class, only for classes
Procedure - name of procedure, function, method
DocType - Indicates whether it is a form, etc.
Userlevel - To control access rights
Department - To control access rights
  * only the specified departments have access to a program)
Caption - One-line caption, to show in a list
Description - Longer description, that might appear below a grid or
  * ListBox if you select a specific line
"Department" would have codes for the departments, separated by a convenient separator. For instance, I use a similar approach as part of the VFX framework, and only for forms; I added the "department" part, which was not part of VFX 6. For the department, I use 4-letter codes; for instance: "purc;acco;sale", to indicate that purchases, accounting and sales has access to the specified form; only the forms that contain the user's department (as stored in a variable) are listed in a ListBox. The "File | Open" dialog also makes it possible to categorize forms; I use the three categories "Data forms", "Reports", and "Processes" (the latter have the potential of modifying multiple records at once).

To answer your previous question, part of your program to execute the selected line might look like this:
do case
case DocType = "P" && Procedure
  if empty(Procedure)
    do (Filename)
  else
    set procedure to (Filename) additive
    do (Procedure)
  endif
endcase
You should adjust a few variable and field names, to avoid conflicts with VFP keywords; for instance, "procedure".
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform