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 / Getting Started / Re: Accessing properties on components from Commands on: October 14, 2008, 10:04:09
Hi CLiff,

Thanks for replying in such depth. I get the idea of binding to the component's property and exposing it through a variable in the view that contains it, and your example works perfectly in the event the change occurs in the component and moves then to the command, but what if the change has occured on another component which has triggered a command and the command needs data from the slider? The slider's mediator still needs to allow the command some way of acessing its value.

In your example:

Component changed > Medaitor Sends CHANGED > Command Takes Action

What I am asking:

Component1 changed > Component1 Mediator sends CHANGED > Command needs value from Component2 so Component2's Mediator must expose this property via a getter

Hope that makes sense...

2  Announcements and General Discussion / Getting Started / Accessing properties on components from Commands on: October 13, 2008, 04:18:02
Hi,

Say I need to find out the value of a Slider or which item is Selected on a List from a Command. Should I add getters to the component's mediator to give it access (I know I could expose the component but that would be bad)?

Just seems like overcomplicating things - a getter for a getter...
3  Announcements and General Discussion / Getting Started / Passing a service URL or loaded XML to a Proxy on: September 11, 2008, 05:18:18
I have seen that in some examples, a service's  Url is passed into a proxy at runtime once it has been aquired (say from a Config class). I have also seen some examples where XML is loaded and then passed into a proxy at runtime.

It seems that really, a Proxy should not reveal its inner workings to the app - If the app needs to know where the proxy is getting the data from, it is failing to do its job as a Proxy. Surely the Proxy should offer only an API to get the data and should be resposible for loading its own data.



4  Announcements and General Discussion / Getting Started / Re: Interpretting Menu Selection on: September 11, 2008, 05:11:31
Thanks for your reply.

I guess that does make sense. I was thinking that all decision making should be made in the Commands, but I suppose that would make the Mediators redundant beyond relaying info to and from their components.
5  Announcements and General Discussion / Getting Started / Interpretting Menu Selection on: September 04, 2008, 05:43:02
Hello.

I have a List that contains a number of icon-buttons. It is kind of a utility bar and each button does something unrelated to the others - one pops open a panel, another resizes the screen, another saves the current setup etc. Each button renderer has a unique ID in its data property.

My question is where does the interpretation of the buttons' ids take place? Should the List's mediator just send an ICON_SELECTED notification with the id as the body and have a Command use a switch statement on the id to decide what action to take?

Pages: [1]