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

Pages: [1]
Print
Author Topic: Mediator Exists but View Component not instantiated  (Read 9026 times)
mark_ellul
Newbie
*
Posts: 8


View Profile Email
« on: April 21, 2008, 10:40:31 »

Hi,

Today I came accross a wierd situation, using the AS3 Singleton Port.

I have a Summary screen tab, which is loaded up after a user logs in and there is a detail tab. The detail tab is shown when the user clicks on the summary, it goes to the detail view.

What I have done is in the mediator send a notification when a user clicks on a summary and it its received by an Command which calls the proxy to load the detail. The proxy sends a notification when the detail was loaded. In my mediator for the detail screen I am receiving that notification and trying to set the fields in my view Component.

The issue I am finding is that if the user has not seen any detail, i.e. the first time they click on a summary, the detail view component doesn't exist so when I am trying to set the text inputs and so on to the detail information its throwing exceptions. The Proxy is getting its data from a server so in theory it could take time to load (though in my dev env it doesnt)

Should I be doing an explicit instantiation of the view component? I don't think that makes sense...

Should I send a notification to view the detail screen before the model proxy sends the load, and make the view "greyed" out until it receives the information? Doesn't look that visually pleasing...

Any other ideas on how I can get around the issue I am facing?

Regards

Mark

 
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: April 21, 2008, 05:12:53 »

Sorry, don't want to repeat what''s been gone over a lot already. Search these forums for the term 'deferred instantiation'. Yes, I resolve, that a FAQ will be made!

-=Cliff>
Logged
mark_ellul
Newbie
*
Posts: 8


View Profile Email
« Reply #2 on: April 24, 2008, 02:52:06 »

Thanks Cliff,

I did a search of the forums, but I did not use the correct term... If you create a FAQ make it like a wiki... I would be happy to contribute!

Regards

Mark
Logged
jinglesthula
Newbie
*
Posts: 8


View Profile Email
« Reply #3 on: May 29, 2008, 12:25:46 »

Good idea 'bout the wiki.

I set up a temp one (at least for the deferred instantiation topic) in the meantime while we anxiously await more documentation and courseware and stuff (I know Cliff's got a lot going on).

Here you go:  puremvc.jinglesthepirate.com

If it's slow loading I appologise.  My hosting usually is a tad faster.

The wiki's limited for now.  If we want, I could open it up to cover the full framework, but I'm not sure about having a 3rd party (me) host it.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #4 on: May 31, 2008, 05:05:29 »

There is a facility in Joomla that I plan to use for the FAQ on the site, but as with any technology having multiple places to find information is always a benefit. The Cairngorm community gets a lot of benefit from the community run cairngormdocs.org, for instance.

-=Cliff>
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #5 on: August 16, 2008, 04:19:39 »

Here's a link to the new FAQ entry for this issue:

http://puremvc.org/content/view/91/185/

-=Cliff>
Logged
Pages: [1]
Print