Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pageframe Resize or Page Switch Resets ADDOBJECT() Contr
Message
De
11/12/2007 11:54:32
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
11/12/2007 06:33:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01274717
Message ID:
01274801
Vues:
14
>> I'm not sure why do you remove the object? We use similar methodology, in page Activate method we add a container if it's not there using NEWOBJECT method. But once added, this container remains added.
>
>Hi Naomi,
>
>The container class that I am adding changes, depending on a value that can be set when initializing a form OR selected from a combobox on screen. I remove the object before adding it again to clear the original object. I could add code to only remove and add the container if the class HAS changed - it would probably be more efficient that way.

And if it has changed back to something you had two minutes ago, you'll still have to kill the current object and create the old one from scratch, and caching is your friend...

Even more efficient would be to have a collection of such objects and keep only the relevant one visible. So instantiate on demand, add to collection. Next request, hide current object, check the collection, if found show it, if not add it.

On destroy, just .remove(-1) on the collection, then remove the collection.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform