Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought

Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

* | |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / Getting Started / Best practices question - Multi-window view on: January 05, 2008, 07:24:12
Hi guys,

I'm putting together a multi window AIR app using PureMVC.

I'm running into an issue with mediator inter-dependency. What I have is a tabNavigator which has a menu (spun off with a separate mediator) which adds a new tab to the navigator.

I want to give the notification object I create to generate the new tab some idea of which window the "add tab" event occurred in. There will be several user gestures which will be window specific and without a clean mechanism of determining which window the gesture occurred in.

One working solution I found involved passing a windowID (generated when the window is first created by a WindowDataProxy up the Mediator tree. This duplicates lots of code and I think there must be a better way.

Another way to do this is to have a utility class which steps up the view heiararchy until it finds the parent window, but this is worse because if the container ever becomes something other than a window then the system breaks.

Wondering if anyone has an elegant solution to this problem,


Pages: [1]