|[XPand] Passing context / parameters through expansions [message #531733]
||Wed, 05 May 2010 20:05
| Miles Parker
Registered: July 2009
I wonder if anyone has any ideas for the following scenario.|
1. In AROUND advice in Advice.xpt, I EXPAND Foo in Base.xpt in multiple places.
2. Foo in turn EXPANDS Bar.
3. I advise Bar in with another AROUND in Advice.xpt.
4. I want to do somewhat different things in Bar depending on where I started in (1).
I could of course modify Foo so that I pass in some generic context information that I then pass back through Bar, but obviously that's not very satisfactory as it requires a major refactoring and breaks other advises. In general this is just a consequence of the language design, and perhaps I should refactor to allow generic "hints" to be passed from one EXPAND to another, but I'm wondering if someone has thought of a better way or there is a language feature that I've missed.
Powered by FUDForum
. Page generated in 0.02735 seconds