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 / How to determine whether a specific notification is sent? on: August 15, 2010, 05:33:25
Hi,
    Recently I've been looking into aproaches to unit testing fabrication flex applications. At many cases mediators send out notifications to react to events fired from its uicomponent and never care what happens next to the out going notification--weak coupling. And I also want my test code to be like this. For instance I only have to make sure that a specific notification is sent out after the button's click event is dispactched. Then I can focus on testing the commands that respond to it. Other wise I could only see piles of integration test code that stick the mvc all together...So is there a general approach? Can i find out the lastest notification sent in fabrication? Thank you very much.

2  Announcements and General Discussion / Getting Started / Re: little question on: August 10, 2010, 05:49:08
VO means "Value  Object" which stands for pure data
3  Announcements and General Discussion / Getting Started / Re: Can i wait for async event to occur in a command class? on: August 08, 2010, 11:24:02
Got the point, thank you!
4  Announcements and General Discussion / Getting Started / Can i wait for async event to occur in a command class? on: August 06, 2010, 12:10:29
Hi,
   For example I want to load a module in a command. So I registered ModuleEvent.READY to a handler in the same command class as its private function. But I learned that the command object is "instant" which means that it'll be destroyed after the excute finishes.
5  Announcements and General Discussion / Fabrication / Can a module route notification to itself? on: August 05, 2010, 07:01:35
Hi,
   I have a logger module that accepts and stores routed log entries from other modules. To do this I write a logger class that serves as a common utility and the code looks like this:
   ...routeNotification(RECEIVE_LOG_MESSAGE, logMsg, null, "LoggerModule/LoggerModule0);
   This works fine except that the logger module itself cannot send log messages. So I guess routeNotification cannot be used to route message to the host module itself?
   thanks~
   
6  Announcements and General Discussion / Fabrication / Re: Flex unit Testing for Fabrication on: July 22, 2010, 07:17:02
Any idea for testing fabrication based app?
7  Announcements and General Discussion / Fabrication / Re: a problem with 0.7.3 moxie on: July 21, 2010, 01:41:05
Yes no problem now. enjoyful!
8  Announcements and General Discussion / Fabrication / a problem with 0.7.3 moxie on: July 20, 2010, 08:19:25
I'm working under flex3

In the simple_routing example I want to apply the two kinds of reaction syntax and remove the mediator's 'onRegister' function in which it adds listeners for compent's events. For example I altered simplemodule.view.MessageNavBarMediator as follows:

step1:
//adding:
      public function reactToMessageShellButtonClick(event:MouseEvent):void
      {
          Alert.show('hi from 0.7.3');
      }

or :

      public function reactToMessageShellButton$Click(event:MouseEvent):void
      {
          Alert.show('hi from 0.7.3');
      }

step2:
//deleted:
/*

  override public function onRegister():void {
    messageShellButton.addEventListener(FlexEvent.BUTTON_DOWN, messageShellButtonListener);
    messageModulesButton.addEventListener(FlexEvent.BUTTON_DOWN, messageModulesButtonListener);
    messageGroupButton.addEventListener(FlexEvent.BUTTON_DOWN, messageGroupButtonListener);
messageInstancesInGroupButton.addEventListener(FlexEvent.BUTTON_DOWN,                                          messageInstanceGroupButtonListener);
  }

*/

or:

//remained, but add 'super.onRegister()' to support reaction syntax

  override public function onRegister():void {
    super.onRegister();
    messageShellButton.addEventListener(FlexEvent.BUTTON_DOWN, messageShellButtonListener);
    messageModulesButton.addEventListener(FlexEvent.BUTTON_DOWN, messageModulesButtonListener);
    messageGroupButton.addEventListener(FlexEvent.BUTTON_DOWN, messageGroupButtonListener);
messageInstancesInGroupButton.addEventListener(FlexEvent.BUTTON_DOWN,                                          messageInstanceGroupButtonListener);
  }

This works fine with 0.6-flex
But It doesn't work when I replaced it with 0.7.3-flex-moxie and changed the app tag to <fab:FlexHaloApplication>.

An error was thrown:

Error: A class with the name 'simplemodule.view::MessageNavBarMediator' could not be found.
   at org.as3commons::ClassUtils$/forName()[/Users/sema/Work/projects/personal/development/PureMVCFabricationIoC/as3-commons-reflect/org/as3commons/ClassUtils.as:83]
   at org.as3commons::ClassUtils$/forInstance()[/Users/sema/Work/projects/personal/development/PureMVCFabricationIoC/as3-commons-reflect/org/as3commons/ClassUtils.as:50]
   at org.as3commons.reflect::Type$/forInstance()[/Users/sema/Work/projects/personal/development/PureMVCFabricationIoC/as3-commons-reflect/org/as3commons/reflect/Type.as:77]
        ...

Am I missing some steps here switching 0.6-flex app to 0.7.3-flex-moxie app?

And also I find that simply adding 'super.onRegister()' in the mediator's 'onRegister()' function will cause the same error with 0.7.3.

However these modifications are  OK with mediators in the shell.view package.
So I suppose maybe some error occured during the module loading process.

Thank you for you time. :)


9  Announcements and General Discussion / Fabrication / Re: Fabrication 0.7.3 released on: July 20, 2010, 06:22:09
Great! All I have to do is to replace the swc file with 0.7.3 and change the app tag name to FlexHaloApplication.
10  Announcements and General Discussion / Fabrication / Re: the built-in component resolver can't userd by fabrication-0.7.2 on: July 20, 2010, 06:19:27
I've tried it and everything works ok now.
Pages: [1]