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
|
Pages: 1 [2]
|
17
|
Announcements and General Discussion / Architecture / XML content docking proxy solution
|
on: November 27, 2009, 09:39:12
|
here is what I started implementing:
a collection of 'docked' xml files that describe my content (pages.xml, layouts.xml, colors.xml, etc.)
i want to put them in separate xmlfilecontent proxies and then have search functions that retrieve the data when necessary.
problem is: some objects described in the xml have IDs instead of values. e.g. an element in the layout had the color 0xff0000. in the xml of layout.xml there is a subnode with <color>myred</color>. The actual color value is in the color.xml as a color node.
how do I stitch that data together, so that I can use a complete layout object in flash without coupling those proxies too much?
|
|
|
20
|
Announcements and General Discussion / Getting Started / Re: renaming of reusing mediators, how???
|
on: October 24, 2009, 03:41:33
|
not sure that saves my problem.
mediators can only be retrieved by NAME not by mediator name , right? so for example:
given I want a framework that delivers flexible layouts with a flexible number of texts on screen
each text only needs the same kind of mediator. as I dont know how many texts i will need, I want to simply re-use my TextMediator for all of them
giving now that one of the texts, say, to show some interaction related info, needs to change.
How would I be able to change this one meditor's text field , given that the mediator ntification interest will all be identical?
|
|
|
22
|
Announcements and General Discussion / General Discussion / Re: Philosophy: mediator storing display layers and creating mediators there
|
on: October 23, 2009, 08:20:34
|
no I just create a basic group of sprites that hold different application interface groups
e.g. interfaceSprite, systemMessagesSprite
those containers will hold quite a number of viewcomponents that are then represented by a mediator each, but the interfaceSprite, systemMessagesSprite i stored in a single general mediator
maybe they should go in a proxy, as there is not much that will happen to those sprites. they are just containers. But they will help keep the interface elements more clearly stacked
|
|
|
23
|
Announcements and General Discussion / Getting Started / Re: Number of mediators registred?
|
on: October 23, 2009, 06:43:37
|
i am working on a big framework and will see to build a tracker of sorts, mainly for debugging reasons as my apps will have to run for 9 hrs straight with lots of restarts so the system needs to stay very clean.
as far as I understand, there is no need to keep track of registered mediators, as puremvc tries to stay as loosely coupled as possible.
But then again , i been into this only for a week.
Why dont you build yourself a proxy that registers mediator names in a list.
might need to extend the facade a bit for this.
|
|
|
25
|
Announcements and General Discussion / Getting Started / Re: renaming of reusing mediators, how???
|
on: October 23, 2009, 12:41:24
|
yeah but not sure why my code doesnt work.
Here si what I do to rename the NAME prop:
public function BasicMediator(myTarget:Sprite,myData:Object,myName:String=null) {
super(myName); initContainer(myTarget); ObjectUtils.synch(myData,this); //addViewElement() trace(NAME); } And here is what the example you gave does:
public function HelloSpriteMediator( viewComponent:Object ) { // pass the viewComponent to the superclass where // it will be stored in the inherited viewComponent property // // *** Note that the name of the mediator is the same as the // *** id of the HelloSprite it stewards. It does not use a // *** fixed 'NAME' constant as most single-use mediators do super( HelloSprite(viewComponent).id, viewComponent ); // Retrieve reference to frequently consulted Proxies spriteDataProxy = facade.retrieveProxy( SpriteDataProxy.NAME ) as SpriteDataProxy;
// Listen for events from the view component helloSprite.addEventListener( HelloSprite.SPRITE_DIVIDE, onSpriteDivide ); }
any idea why my version still doesnt show the new name?
|
|
|
26
|
Announcements and General Discussion / Getting Started / renaming of reusing mediators, how???
|
on: October 22, 2009, 11:51:27
|
here is my conundrum:
I set up a basic mediator, one that basically just displays some clips. Lets call him/her ClipMediator. Now I want to re-use this one in my interface displaying different clips/content, which is fine on initialisation, as I just ahdn over different content.
Yet if anything changes due to user interaction, network process, etc. how can I retrieve one particular mediator and exchange the content? Mediators are retrieved by NAME and the names of all my ClipMediators are 'ClipMediator' (i chose the same NAME as the class name)
how do I rename the NAME property of the mediator ?
of do I have to solve this in another way? I cant go and produce 100 classes with unique names you know.(well i could but how about reusable code you know...)
anyone?
|
|
|
27
|
Announcements and General Discussion / General Discussion / Philosophy: mediator storing display layers and creating mediators there
|
on: October 20, 2009, 06:44:54
|
Hello, this is my first post here and I am fresh and ready to burn some rubber here (oeh).
I am re-writing my MVC framework from AS2 to 3 and am using puremvc as a base for it. Here is my first question towards the process:
I built a mediator that houses all main display containers for all application view elements. E.g. interfaceContainer for all the interface, messageContainer to stay on top of teh interface, displaying messages, etc.
a command is creating new mediators to put view elements into those main containers. My plan is to retrieve the container mediator and create my new mediator by giving him/her the container reference from my container mediator.
Does that sound like a sensible solution, or would I rather have the container mediator send a notification to a command, then creating the new view element, like a collection run of a notification to pick p all elements for the new mediator on the way?
|
|
|
|
|
|