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 / Fabrication / Re: Quetion for "respondTo"? on: May 04, 2009, 10:04:24
Thanks Darshan,
Little bit late response as I was snowed by work stuff. Don't understand why I didn't look into commands registration as first:). Demo is probably harder to get on begining but is great way to get into it in bigger scale. I had longer play with fabrication and I'm still impressed how well this ulity is coded. Intensive crossloading of flex and flash modules and still no issues. Everything works as expected. Great stuff!
cheers

Pavel
2  Announcements and General Discussion / Fabrication / Re: Quetion for "respondTo"? on: March 29, 2009, 04:38:04
I have the same problem. The simple_fabrication_routing drives me crazy. I tried to find how exactly routing works. I know about respondTo<NotificationName> and that's probably why I don't understand this demo:
Scenario: I launch demo load 1-2 mosules and then I press notify all modules.

Now I wanted to find out how exactly this works...

in MessageControlBarMediator I have function
private function messageAllButtonListener(event:FlexEvent):void {
         routeNotification(FabricationRoutingDemoConstants.RECEIVE_MESSAGE, "Message From Shell");
      }
this is fired when I press notify all modules.
...
FabricationRoutingDemoConstants.RECEIVE_MESSAGE is stated as: "receiveMessage"
...
that should route note across modules and module with listener respondToReceiveMessage should be fired, but nothing like that exists.

but there is function in MessageCountMediator called:

public function respondToShellMessageCountProxy(note:INotification):void {
         updateShellMessageText();
      }
this display updated number in module
...
but how this is fired?? have no idea. I tried to play with CounterProxy and this nearly bring me to maddness. I found function:
public function changeCount(newCount:int):void {
         if (count != newCount) {
            setData(newCount);
            sendNotification(COUNT_CHANGED, newCount);
         }
      }
there is sendNotification call. I noticed that when I comment this out it does not fire respondToShellMessageCountProxy in module but when I change it to ie sendNotification("blaBla", newCount); it fires anyway!? even I call just sendNotification() it still fires module respondTo.

still have no idea where is listening for respondToShellMessageCountProxy created.
SimpleModuleConstants.SHELL_MESSAGE_COUNT_PROXY seems has the right syntax but can't find where is implemented as note name.

Most irritating thing about that is that I have this in front of my eyes and it works but bloodyeel can't find why:)

Any ideas??

Thanks

PS: thanks to Cliff and Darshan for creating something what brought real joy into flex programming for me
Pages: [1]