Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Classlib at moment of use versus opening them all
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00061040
Message ID:
00061356
Vues:
31
>I'm told that loading all the classlibs within an application is faster than issuing Set Classlib (whether additive or not) than issuing the command when you need it.
>
>main.prg
>set classlib to (all my libs) additive
>
>OR
>
>Some procedure or whatever
>
>set classlib to (the lib needed)
>.addobject() or createobject
>release classlib
>
>What's the better way? I need the fastest, but I've found that sometimes when using the first method (all opened), that one of two things happen; either it can't find the class definition which means the classlib was closed somewhere or something closed it (I'm quite positive that I've removed all release classlib commands), or it sometimes takes forever and a day to create the desired object which implies some sort of lengthy search by VFP to find it's definition.
>
>Because they sometimes seem to close for no apparent reason, I'm inclined to go back to issuing the command at the time of needing a specific object and then releasing it. But, I'm told that is the slowest manner in which to do so. So, all comments and suggestions are welcome. I'd like to know how others are doing it.
>
>Steve Despres

We open all of our class libraries during the initialization of our applications and haven't had any problems with them closing. It is much faster than opening them individually when they are needed, especially over a networked application.

Randy
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform