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 / How should I do this? on: April 07, 2009, 04:28:23
Hi guys,

I'm just getting my hands wet with PureMVC ( AS 3.0 ) and I can say that I'm quite excited. I have a question for the more experienced members: I have a small test application where I'm listening for a MOUSE_DOWN event. Once such an event is triggered, I want to update a Label situated in the main .mxml file that will display the current X and Y position of the cursor.

1) The mouse stuff is handled in a class called ApplicationMediator. Is it ok if I store the passed viewComponent ( in my situation the MainApplication itself ) in a private variable and when I want to update the textfield then I simply do _viewComponent.myLabel.text = "whatever"; or should I send another notification that would trigger another command that would somehow update the label ( no idea how ).

2) There is some default text in the label which I'm loading from a local resource ( I have my ResourceBundle defined and so on in main .mxml ). How should I update the label with the new data and at the same time read the desired local resource ( a string ) and update it with my newly fed data. Example: resourceManager.getString('MainApplication', 'lblCurrentPosition', [1, 1]);

The problem is that I don't seem to have access to the resourceManager from within my ApplicationMediator and I'm not really sure which way would be the best way to do this whole update thingie. Should I create an instance of the same resource bundle inside the ApplicationMediator class too and access my resrouces that way or can I somehow get the stuff my communicating with the main.mxml file...

Any hints are greatly appreciated. Thanks.
2  Announcements and General Discussion / Getting Started / Can't seem to find the newly updated docs. on: November 30, 2008, 01:22:27
Sorry, I must be blind... But I really can't seem to find the newly updated docs: http://forums.puremvc.org/index.php?topic=6.msg1348#msg1348 ; Everything seems to look the same as before... Could someone please enlighten me and maybe link me to the new docs ? Thanks.
Pages: [1]