Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Design Patterns - Iterator/Visitor
Message
 
 
To
17/12/1998 11:02:06
Rex Mahel
Realm Software, Llc
Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00168517
Message ID:
00168657
Views:
29
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform