Hello, I have a command that gets called from a few different views,
and when it returns (it makes a WS call), it needs to update a control
in the view that initiated the call. The approach I am considering is
to pass the view reference in the event that is dispatched (its
already a subclass of CairngormEvent with its own properties) and then
calling a function on that event param in my command's result handler.
Something like this:

cancelEvent.callingView.doStuff();

Is there any reason I should avoid this or perhaps a better way? I am
thinking that a better (more decoupled) way might be to pass the view
and function name, and then call the function via apply. Something
like this:
Function(cancelEvent.callingView["funcName"]).apply(cancelEvent.callingView);

Thoughts? Suggestions?

TIA,
Ben

Reply via email to