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: getting 1009 error from mediator on: May 02, 2011, 03:27:16
It works. After much gnashing of teeth and pulling of hair, I think I finally understand what I did wrong:

ApplicationMediator.as was missing the following getter:

protected function get app():Contacts {
     return viewComponent as Contacts;
}

I just need to figure out what I need for the MainView mediator to register the sub-component mediators properly

Cliff, thanks for all your time and help.
2  Announcements and General Discussion / Getting Started / Re: getting 1009 error from mediator on: May 02, 2011, 10:34:46
The contactsControlBar is a view component inside the main application file (Contacts.mxml), not in any viewstack or tabnavigator.  The reference to the control bar is in the mediator using a getter:

protected function get contactsControlBar():ContactsControlBar
      {
         return viewComponent as ContactsControlBar;
      }

Am I doing this correctly?
3  Announcements and General Discussion / Getting Started / Re: getting 1009 error from mediator on: April 30, 2011, 11:04:19
Still bombs out on this line:

contactsControlBar.setAuthVO( AuthVO(note.getBody()) );

I'm stumped.

4  Announcements and General Discussion / Getting Started / Re: getting 1009 error from mediator on: April 28, 2011, 02:43:47
It almost certainly is a problem with the ControlBar component not being instantiated. When I look at the web page for the app, it shows the progress bar being full, but then it throws the error in the debugger before I can see the app itself. the progression for the command is as follows:  facade.startup(this) called from CreationComplete on main program, Startup command is registered to listen for STARTUP notification in ApplicationFacade, AuthCommand is called from StartupCommand, AuthCommand creates authVO, calls authVO method to get username, calls authproxy method to get userRole from remoteObject, authProxy sends notification and authVO with username and userRole as note body to observer, ControlBar mediator listens for notification and then populates labels with values from authVO.
5  Announcements and General Discussion / Getting Started / Re: getting 1009 error from mediator on: April 28, 2011, 10:25:16
Cliff:

I'm using flash builder 4, and I've checked the value of the note body. It's returning the correct values, so I'm pretty sure it has to do with the component not being instantiated. The startup script creates the views and models before it runs the auth command, but is it possible the flex application isn't creating the components before that? if so, what can I do about it?

I'll take your advice about encapsulating the view component. I thought I might using the mediator incorrectly.

Thanks.
6  Announcements and General Discussion / Getting Started / getting 1009 error from mediator on: April 15, 2011, 12:45:02
I've got a mediator that accesses a view component child of the main program.  When I try to set a property of a child view component of the child in that mediator, it get a #1009 error (cannot access null value

   case AuthProxy.AUTH_SUCCESS:
               authVO = note.getBody() as AuthVO;
               contactsControlBar.authLbl.text = authVO.getUserRole;
                contactsControlBar.uNameLbl.text = authVO.getUserName;
            break;

I've searched all over, and I'm pretty sure it has to do with the child component not being instantiated, but I can't really figure out how to implement the fix correctly. One post I read said to use :

override protected function commitProperties():void
20               {
21                   super.commitProperties();
22    }

but I'm still not able to really figure it out. I need to know exactly what's happening, and how the fix works. TIA

Mike
Pages: [1]