You could write a class called StepCommand and switch() on the type
property. The use a delegate from there or whatever you are doing.

Define the 8 events for each step in a StepEvent class.

May not be what others would do but, I have done it and it works fine.

I mean common, this is like a philosopher staying in the mountains his/her
whole life. What does it mean if you can't apply it to life and bend your
own rules. ;-)

Peace, Mike

PS, so stop wasting time witting all those classes! :)

On 1/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

   I have an interface that defines 3 getters for a "Step" in a wizard.



Public function get valid():Boolean;

Public function get next():MyEvent;

Public function get previous():MyEvent;



Valid: is the current step of the wizard valid

Next/Previous: is the next/previous CairngormEvent in the "chain"



I'm getting into a situation where I'm writing a lot of what seems to be
redundant code just to generate the appropriate events when valid, next and
previous change because, according to the documentation, we need both a
getter and a setter for "simple" data binding events.



Valid will change any time the mx:Validator's change, next will return
null or the appropriate event based on whether the step is valid or simply
null at the end of the steps, previous returns the previous step, or null if
it's the first step.



Going down the path that I'm currently following, I have to write the
exact same event generation code for each of my 8 steps, and it doesn't seem
to be trivial.  Does anyone have any insight into how I could solve this
problem more simply?



Thanks!



*Jay Proulx*

Application Developer

Internet Delivery Services - eVision Team

[EMAIL PROTECTED]

(613) 783-6711






--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.

Reply via email to