Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dectect a Grid on a Form
Message
De
07/12/2005 10:32:53
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01075605
Message ID:
01075731
Vues:
20
>>On the other hand, I try to reduce the number of createobjects to test whether something is installed
>>
>>They take time, especially if you have them in a menu skip for clause
>>
>>So, the first time I need info (reg class, regex, ...) I instantiate the class and cache the result. The next time, I take it from the cache
>>
>>So, one createobject('Excel.application') does not matter too much
>>_________
>>
>I would say that registry class has less overhead than trying to instantiate the Excel. I agree, that it would be nice to re-use the same instance of registry class if we already instantiated it. But in this code it's created as a local variable. Let me find the original message from Della where she explained why this function was invented.

I'm not saying that I only instantiate the reg class once. Only that I instantiate it once per info I need, eg app associated with pdf or xls or doc ...)

ie, I ask the app associated with xls to the cache. Since it it not in, I instantiate a reg class and store the app associated with xls in the cache. Then I release the instance
Next time I need the app for xls, it is in the cache

I started doing that when I noticed a delay for the menu (skip for)

I have an app where the customer has a folder (per customer of his) where he puts several docs (xls/pdf/doc/rtf, ...)
I put the contents of that folder in the menu. (refreshed every time the menu is activated)
Per file extention I need to know what app/exe to start with the parameters if the user selects that file on the menu
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform