Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Design Patterns - Iterator/Visitor
Message
 
 
À
17/12/1998 11:02:06
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00168517
Message ID:
00168657
Vues:
26
Rex,

A couple of things to look at. VFP can easily send arbitrary numbers of parameters around methods calls.

I'd just use a second object as the "parameters", put a property in the object for each parameter and let the iterator just hand the visitor the iterated object reference and the parameters object.

>I have created iterator/visitor type objects in VFP, but I have a question. I now have a visitor which needs parameters for each object visited. I want the iterator object to do nothing but pass the object reference and any parameters to the visitor object and have the visitor object know what to do with the information. I don not want the iterator object to know anything about the information passed except when all the objects have been visited. I have toyed with the idea of having an object in which the object reference and the parameters are properties, but this seems too complicated.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform