Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make copy of an object
Message
De
21/04/2000 13:41:13
 
 
À
21/04/2000 03:48:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00362076
Message ID:
00362294
Vues:
23
Thanks Mike. I've been doing just that starting from a West Wind routine.

While restoring properties how can I tell if a property is read only? For example _SCREEN.viewportwidth. Is there a better way than trapping the error?


>>1) Is there a quick and dirty way of saving an object's properties (it's state) so that they can be restored later? At this time I wish to save the properties of the _SCREEN object to restore them later, but this is obviously a frequent situation and I am sure there is a one line solution.
>
>AMembers() to start with
>
>>2) Along the same vein, is there generic way (sounds better than quick and dirty) of making a complete copy of an object? The difference with question one is that this time any objects contained in the source object are copied along with the properties.
>
>Sam eway, You can use the class property to create the new class, then AMembers to set every property correctly.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform