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 2 [3] 4 5 ... 10
31  Announcements and General Discussion / Getting Started / Re: the use of pop-up screens on: January 28, 2009, 07:15:23
http://forums.puremvc.org/index.php?topic=105.0

Here is a discussion about popups.

As to organizing your package structure.. I like to break my applications down into sections and build my packages up like that. Each section will have a model/view/controller package and its appropriate bits underneath those.
32  Announcements and General Discussion / General Discussion / Re: puremvc and Flash platform code generation on: January 28, 2009, 07:07:48
http://www.dehats.com/drupal/?q=node/7

the Flex Code Generator has some PMVC capabilities. The source is available and it is pretty simple to hack it to your needs.
33  Announcements and General Discussion / General Discussion / Re: Popup Window on: January 25, 2009, 11:55:44

Windows

For windows in AIR I have the same approach regarding a command to open one. I've had a real need for this since I have logic that has to figure out if the window for a VO is already open, if it is just activate it (bring it to the front and set focus) otherwise one needs to be created. In this case the command is called OpenIdeaEditorCommand and my mx:Window component is called IdeaEditor (think exactly like creating a new email with Apple Mail).

My case is that what makes the component unique is the IdeaVO. I use Flex's UIDUtil class and call the getUID(obj) method passing in an IdeaVO instance to make sure I have a unique id for each instance. This is how I register mediators since I use that UID as a name! I check if their is a mediator registered with that name and if there is I know a window is already open (in this case for an existing idea that is being edited) so I send a ACTIVATE_IDEA_EDITOR notification which that Mediator responds too by calling the viewComponent's activate() method.

If the mediator is not registered I know I need to create a new IdeaEditor so that is done in the command as well as creating and registering the new mediator. All event handlers are taken care of within the mediator, not the command! So if you close the window the mediator listens for a close event so it can remove itself from the Facade. Hot! :) Cliff, I showed this at the set of PureMVC presentations at MAX since it is an AIR client I built using PureMVC.

This is exactly how I handle Windows in AIR also. It works really well. I usually create AbstractIdeaWindow components as well to provide a similar interface across the related components - in addition to the AbstractIdeaWindowMediator (which extends my common AbstractMediator).

All of my VOs (and database tables) carry a UID property with the constructors passing a new UID (if it isn't already there). This is great because I don't have to wait for the object to come back from the service with an ID property and can track it instantly in my application for interface items (Windows) unique to the object.

This is the typical execute method in my OpenWindowCommand classes:

:
override public function execute(notification:INotification):void
{
var caseVO:CaseVO = notification.getBody() as CaseVO;
if(!caseVO)
return

var caseWindow:CaseMediaWindow;
var caseWindowMediator:CaseMediaWindowMediator;

if(facade.hasMediator(CaseMediaWindowMediator.NAME+caseVO.UID))
{
caseWindow = facade.retrieveMediator( CaseMediaWindowMediator.NAME+caseVO.UID ).getViewComponent() as CaseMediaWindow;
caseWindow.activate();
caseWindow.restore();
caseWindow.orderToFront();
}
else
{
caseWindow = new CaseMediaWindow()
caseWindow.open();
caseWindowMediator = new CaseMediaWindowMediator(caseWindow, caseVO);
facade.registerMediator(caseWindowMediator)
}
}
34  Announcements and General Discussion / Architecture / Re: Multiple delegate service parameters in different views on: January 24, 2009, 08:40:23
When the search parameters are changed they are stored to a SearchParamsProxy (with perhaps SearchParamsVO as the data) whish is then referenced for the actual search.
35  Announcements and General Discussion / General Discussion / Re: Where to put some url parsing code - proxy or command ? on: January 21, 2009, 07:16:26
hi guys,
I am doing a similar thing with my app.
I'm Using a command to parse config xml which contains site url and other paths.

Once the xml has been parsed, where should i be storing the config data?
Inside a proxy? Or inside a static class from which the proxy's grab the url when doing requests?

cheers

I parse my configs into value objects on a proxy.
36  Announcements and General Discussion / Getting Started / Re: Cannot receive the same notification with multiple mediators on: January 19, 2009, 10:15:09

I also tried debugging to see the observer lists in the view, but I don't know where to find these lists.

The Observer map is in facacde.view.observerMap and Mediator Map is in facade.view.mediatorMap.

After you choose "Show Inaccessible Member Variables"
37  Announcements and General Discussion / Getting Started / Re: How to import helpfiles (asdocs) to flexbuilder/eclipse? on: January 19, 2009, 10:13:21
Hi, I'm new in pureMVC.

After downloading the Startup Manager, I added the *.swc-file to my flex project. Now I want use the helpfiles according to. What is correct way?

My setup is:
Win, Eclipse 3.3, Flexbuilder Plugin

--
ciao, blue

You open them in a browser. I don't know that they will display inside of Flex Builder, though eclipse might have some sort of ineditor html browser/viewer.
38  Announcements and General Discussion / Public Demos, Tools and Applications / Re: PureMVC Metatags helper for Mediators on: January 16, 2009, 11:02:24
infact it is best if they refer to class methods, then you don't need local vars, you can cast and pass body and type as method arguments.

I've been trying more and more to use the method extraction refactor on these statements, as well as creating lighter mediators without two page handleNotification methods ;)

I'm looking forward to the next version of Flex Builder. The templates are gonna be a great timesaver.
39  Announcements and General Discussion / General Discussion / Re: Listen for component events inside mediator on: January 15, 2009, 07:37:09
After reading the Implementation Idioms and Best Practices once again I came to following conclusion:
Despite the seemingly redundant event handling in both the mediator and the MXML component it's probably better to dispatch custom events from the MXML component.

Especially possible later changes in the component won't necessarily force a change in the mediator.

Thanks goes to Cliff Hall for his excellent documentation.

When I first started using PMVC I went for option 1. It is mess. Option 2 gives a lot more freedom, versatility, portability, and overall system knowledge.
40  Announcements and General Discussion / Public Demos, Tools and Applications / Re: PGProxyReservation on: January 09, 2009, 04:02:15
I went ahead and changed the code for my use to use the passed id string as the name of the proxy as I use a lot of dynamically named proxies in my system. After that it seems to be working great. I'd probably like to have an abstract class to implement that took care of the IEventDispatcher, ready, and clear bits (with getBulkData() in the concrete class) - since they are all generic anyway.

I have a rather data intensive application that I am currently optimizing, so it will be cool to see how it all works out. I will report back :>

Cheers.
41  Announcements and General Discussion / Public Demos, Tools and Applications / Re: LFPUG PureMVC presentation video with examples on: December 25, 2008, 12:40:37
Although there are a number of presentations out there that have been given (such as the one this topic mentioned originally) I don't know of any video tutorials with examples. But, serindipitously, that is the main thing I've been thinking about this week, and I'm hoping to get something available soon. I'll be playing with the various tools to see what the format will be and how to record and edit in the screencast, talking head and slideshow components in the next few days.

-=Cliff>

I'd be willing to help in such a project. Video production is on my 'can do' list.
42  Announcements and General Discussion / Public Demos, Tools and Applications / Re: *Hot* KapLab's PureMVC debug and monitoring console for AS3/Flex on: December 22, 2008, 09:41:38
Thanks for getting the fix in so quick Julien. This is awesome.
43  Announcements and General Discussion / Public Demos, Tools and Applications / Re: *Hot* KapLab's PureMVC debug and monitoring console for AS3/Flex on: December 19, 2008, 08:19:52
ReferenceError: Error #1069: Property body not found on fr.kapit.puremvc.as3.multicore.notifications.PureMVCDebugNotification and there is no default value.
   at fr.kapit.puremvc.as3.multicore.patterns.facade::DebugFacade/_addNotificationRecord()[C:\Documents and Settings\buildmaster\.hudson\jobs\LAB-PureMVCMultiCoreKapit\workspace\PureMVCMultiCoreKapit\src\fr\kapit\puremvc\as3\multicore\patterns\facade\DebugFacade.as:205]
   at fr.kapit.puremvc.as3.multicore.patterns.facade::DebugFacade/debugNotification()[C:\Documents and Settings\buildmaster\.hudson\jobs\LAB-PureMVCMultiCoreKapit\workspace\PureMVCMultiCoreKapit\src\fr\kapit\puremvc\as3\multicore\patterns\facade\DebugFacade.as:171]
   at fr.kapit.puremvc.as3.multicore.patterns.facade::DebugFacade/notifyObservers()[C:\Documents and Settings\buildmaster\.hudson\jobs\LAB-PureMVCMultiCoreKapit\workspace\PureMVCMultiCoreKapit\src\fr\kapit\puremvc\as3\multicore\patterns\facade\DebugFacade.as:152]
   at org.puremvc.as3.multicore.patterns.facade::Facade/sendNotification()[C:\workbench\VESessionDesktop\libs\org\puremvc\as3\multicore\patterns\facade\Facade.as:277]
   at com.visualempathy.session.core::ApplicationFacade/startup()[C:\workbench\VESessionDesktop\src\com\visualempathy\session\core\ApplicationFacade.as:138]


I'm getting some errors on the multicore version. I followed the instructions faithfully.

This is great stuff!
44  Announcements and General Discussion / Architecture / Re: Event gets Dispatched, but Mediator Not recognizing the Event?? on: December 11, 2008, 12:33:56
are you sure the creationComplete event is happening after the mediator has been created and registered?
45  Announcements and General Discussion / General Discussion / Re: What are the benefits of using pureMVC over a hand coded MVC? on: December 06, 2008, 01:04:39



heh
Pages: 1 2 [3] 4 5 ... 10