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: How should I do this? on: April 07, 2009, 09:54:10
Thanks Cliff, I'll definitely take a look at the EmployeeAdmin Demo and will try to add the new stuff you said to the existing application. Thanks again.
2  Announcements and General Discussion / Getting Started / Re: How should I do this? on: April 07, 2009, 08:11:20
Ok, what I did ( please correct me if there would be a better solution ):

I defined a getter method that returns the viewComponent casted to MainApplication. I defined a public getter in the MainApplication.mxml file that returns a reference to the IResourceManager instance. I update my label from within the ApplicationMediar by doing something like this:

override public function handleNotification(notification:INotification):void
    switch (notification.getName())
        case ApplicationFacade.POSITION_UPDATE:
            var position:MouseVO = notification.getBody() as MouseVO;
            app.outputLbl.htmlText = app.resManager.getString("MainApplication", "lblCurrentPosition", [position.x, position.y]);

As I said, this is really just a test application but I'd really want to get it right because I might get used to doing it the wrong way and that's really not cool ( I'm still not "thinking in PureMVC" but hopefully, really soon, I will ). Thanks.
3  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.
4  Announcements and General Discussion / Getting Started / Re: Can't seem to find the newly updated docs. on: December 01, 2008, 03:57:21
Ohh, lol... Yeah, I'm blind. I didn't bother looking at the post date, it was blue so I thought that it's a recent post... My bad, sorry and thanks for the reply.
5  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.
6  Announcements and General Discussion / Getting Started / Re: Courseware on: November 29, 2008, 08:02:54
Yeah, some tutorials would really be great... No offence, but the examples I see posted are everything but not helpful... I'm not a beginner but the framework is confusing as hell... Each example is twisted as hell and it just creates more confusion than actually a starting point...

Everyone uses the framework in his own way and from what I've read, almost no one is using it correctly... 90% of the examples are going against the PureMVC best practices... each discussion I've read has stuff like "ohh, you shouldn't have took that approach, it's not good the do that and that and that" but the example is still there and it's still uncorected ( at least from what I can understand ).

The documentation and the whole site is really lacking on "Intro to PureMVC, simple example for Dummies". I really can't get my head around all that mess... The only app I found helpful is the HelloFlash app and I wanted to create a fast test myself with a login form, but when I took a look at the LoginForm app then I got totally confused... nothing seems the same there, not even the idea, nothing...

It would help the community a lot if we'd finally get some Step By Step tutorials on how to start using this framework from the ground up... Looking at examples from X people isn't helping ( at all ), mainly because 90% of the examples continue in the Discussion area with "you should have done that like that... and like that and like that" but without a single piece of code to understand the difference between what's bad and how should it be corrected...

The framework itself is looking really good, but the lack of documentation and especially examples brings it down a lot...

Just my 2 cents. I really hope some actual tutorials and basic examples will be posted soon.
7  Announcements and General Discussion / Public Demos, Tools and Applications / Re: Moonlighting - My first PureMVC website: AS3, Papervision, and a lil SWFAddress on: November 28, 2008, 02:52:32
Thanks for the prompt reply, I'll definitely check those links out.

Cheers  8)
8  Announcements and General Discussion / Public Demos, Tools and Applications / Re: Moonlighting - My first PureMVC website: AS3, Papervision, and a lil SWFAddress on: November 28, 2008, 11:31:57
Really great work !

A question: Might it be possible that you share the source of those sites ? I'm quite new to PureMVC and I still have a lot to learn, it would be really great if I ( we - the whole community ) could get our hands on some concrete site examples that were built with PureMVC.

Obviously, you don't have to supply the graphics and everything, just the source code...

I know this is an almost impossible will but I thought I'll give it a shot and ask you. :) Or, if you don't want to share those sites, than could you maybe upload a few simple example you did ( exepriments ) ? Those would help a lot too...

Pages: [1]