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
31  Announcements and General Discussion / Architecture / Re: Proxy registration / Stage child management on: March 04, 2008, 04:29:56
Perhaps the best solution is to register all mediators and children in the StageMediator constructor and set them all to invisible, then manage their visibility as and when they are needed?
32  Announcements and General Discussion / Architecture / Proxy registration / Stage child management on: March 04, 2008, 02:59:39
Hello I have a couple of questions...

1) Should all proxies be instantiated and registered together when the application starts? Or can this be done as and when they are needed?

2) I work in a pure AS method, i do not use flex and i am trying to decide the best way to handle the creation and addition of new children to the stage etc...

if my AssetProxy executes:
facade.registerMediator(new ProgressBarMediator(new MovieClip()));

How should i handle the addition to the stage? Is it a bad idea for the Mediator to gain a reference to the stage? Should i send the child as the body of a notification? Should i create the movieclip and attach it to the stage from the command and THEN create the mediator with a reference to the new child?

I cannot seem to find an elegant solution to the management of children.

Many thanks in advance.

33  Announcements and General Discussion / Architecture / Re: Preloader logic placement on: March 04, 2008, 02:09:41
Sounds great!
34  Announcements and General Discussion / Architecture / Re: Preloader logic placement on: March 03, 2008, 10:19:06
OK great,

The only thing i cant decide is startup flow... does the following sound correct?

StartupCommand - sends LoadAssets notification
LoadAssetsCommand - tells AssetsDataProxy to loadAssets()
LoadAssetsCommand - creates ProgressBarMediator and views etc
ProgressBarMediator - listens for AssetsLoading Notifications from the AssetsDataProxy
AssetsDataProxy  - sends AssetsLoaded Notification
AssetsLoadedCommand - removes ProgressBarMediator & views etc then continues with app

Is this a bad approach?

Thanks.
35  Announcements and General Discussion / Architecture / Preloader logic placement on: March 03, 2008, 08:55:37
I have a separate swf that contains all graphic assets for my app.

I cannot decide where the logic for preloading should go...

Somewhere it has to interact with a view to display the load progress.

Should the loading logic be placed into a proxy and dispatch a progress notification  ????

If so how would you use the "data" property of the proxy? to hold the "LoaderContentInfo" of the loaded swf and then provide a getAsset() method?

any thoughts?

Thanks.
36  Announcements and General Discussion / Architecture / Re: Load View & Mediator based on Remote Proxy result on: January 23, 2008, 09:45:32
Could you explain further?

The calls are split across proxies...
37  Announcements and General Discussion / Architecture / Load View & Mediator based on Remote Proxy result on: January 23, 2008, 06:57:25
Hi,

I am having trouble making a design decision...

When a user clicks on a category from the menu the following needs to occur:

1) The MenuMediator sends a notification which is bound to a LoadCategoryCommand

2) The LoadCategoryCommand needs to check which view and mediator to load

2 a) LoadCategoryCommand asks the CategoryProxy if the selected category owns any child categories. If so load the category view. If not -> 2b
2 b) LoadCategoryCommand asks the ProductsProxy if the selected category
owns any products. If so load the product view. if not -> 2c
2 c) LoadCategoryCommand asks the PageProxy is the selected category owns a page. If so load the page view. If not redirect the user / display error.

My problem is that the LoadCategoryCommand cannot listen for updates from the proxies, and the proxies must dispatch an event because they are loading XML from a remote URL...

Where should I handle the updates from the Proxies, and then decide which view to load.

38  Announcements and General Discussion / Architecture / Re: sendNotification EventListener Bug on: January 22, 2008, 02:21:40
Yeah i cant seem to pin-point what is causing this problem, it is definitely something to do with events.. somewhere.

I will investigate further when i have time.
39  Announcements and General Discussion / Architecture / Re: sendNotification EventListener Bug on: January 21, 2008, 03:34:22
OK... it turns out this is some sort of AS3 Bug.

Imagine the following hireachy: Stage->MenuMC->ItemMC->ButtonMC

The actionscript from the first frame of ButtonMC is being ignored. This seems to be for all children at or above level 2 (Stage being level 0)

I cannot seem to figure out what triggers this bug but it does not happen when i add the menu items BEFORE instantiating my URLLoader.

For the moment i have moved all code to frame2 which isn't a very elgant solution. Is anyone else familiar with this problem?
40  Announcements and General Discussion / Architecture / Re: sendNotification EventListener Bug on: January 21, 2008, 10:33:24
Erm.. movieclips in flex have timelines.
And you have a thick kludgy pointless framework to trip you up :)
41  Announcements and General Discussion / Architecture / Re: sendNotification EventListener Bug on: January 21, 2008, 09:57:45
Joel i do'nt think you have understood the problem

MenuMC is a movieclip of the menu.

MenuItemMC is an individual menu "button" & text etc.

The anonymous function works fine and the notification is dispatched.

The problem is that when i add children to the stage after receiving a notification they ignore their time line scripts
42  Announcements and General Discussion / Architecture / Re: sendNotification EventListener Bug on: January 21, 2008, 09:15:13
The actionscript is ignored, e.g the stop() command on the first frame of MenuItemMC
43  Announcements and General Discussion / Architecture / Re: sendNotification EventListener Bug on: January 21, 2008, 07:34:29
Sorry i forgot to mention i have the same problem on the event listeners on the menu buttons as i do on the event listeners on the url loader.
44  Announcements and General Discussion / Architecture / Re: sendNotification EventListener Bug on: January 21, 2008, 07:33:34
yes, the following happens..

MenuMediator Loads and asks CategoriesProxy to loadCategories()

loadCategories invokes my httpservice and parses the XML

When MenuMediator hears ApplicationFacade.MENU_CATEGORIES_LOADED it calls buildMenuItems()

these items, when added to the display list, are broken.

If i call buildMenuItems() directly from the constructor, and comment out loadCategories() they appear as they should do.


45  Announcements and General Discussion / Architecture / Re: sendNotification EventListener Bug on: January 21, 2008, 06:54:28
Erm... of course it does. Try for yourself.
Pages: 1 2 [3] 4