The Intranet example is a full application created to show several Mate features and to provide a "best practices" example. It uses modules to show how you can separate your application into independent parts with Mate and the use of LocalEventMaps.
To compile it, you must add the folders "mock" and "test" to your build path. You must also compile the modules Admin and Contact.
There are two different users that can login in the example. admin/mate will give you administrative rights, guest/mate will give you read only rights.
You can also run a simple sample unit test on the Presentation Model for login.
This is an advanced example. If you'd like to look at something simpler, see the Stock Quotes example.
I have attempted to compile/run the example but the modules are not loading into the main view at runtime. All I get is the loading icon. What am I missing?
Make sure you add the modules in the Flex Modules sections of the preferences.
Password: mate
- dispatcher.dispatchEvent( event );
and statement:
- dispatchEvent( new Event( "xxxx" ) );
I wonder why sometimes it needs "dispatcher.dispatchEvent()", and sometimes it is ok to just use "dispatchEvent()".
Can anyone give me some light? Where can I find more information to explain this?
Thanks in advance.
dispatchEvent( new Event( "xxxx" ) ); only exists to support the Bindable tag. See: http://www.adobe.com/livedocs/flex/3/html/databinding_8.html
The other one is to be able to dispatch a global event that can be heard by the event map.
Here is some more info about it too: http://mate.asfusion.com/forums/topic.php?id=461
Vichet.
However, I lost some topics of the design, I can't understand why you use classes for presentation model and clases for managers, with Presentation Model pattern you only need PresentationModel classes isn´t it?
Also greatly agree that the conversion to Flex 4 would help readability quite a bit since the states code becomes much simpler and less verbose.
http://ajdotnet.wordpress.com/2010/01/01/excursus-presentation-model-pattern/
http://blogs.adobe.com/paulw/archives/2007/10/presentation_pa_3.html
I´m try to do a card based game following this example. The backend is a PHP system (with ZendAMF). How I can do if I want to put a new button (after dispatch a event) to a module that has been created? The module is working, but I want that it appears only after the user do some action. I´m trying this:
I´ve create a new function in PermissionManager called addModule(name:String, url:String) than I´ve push the new module to _modulesAllowed array: _modulesAllowed.push( new ModuleDescriptor( name, url )); .But doesn´t work. Has someone an idea to how I can do this?
any one tried???