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: One Way Deep Linking, grabbing a querystring, when and where?  (Read 7904 times)
eco_bach
Courseware Beta
Sr. Member
***
Posts: 81


View Profile Email
« on: September 01, 2010, 01:56:28 »

Hi
A project requirement is that it be 1 way deeplinkable(a specific query string will load a section within the swf).

I have a URLProxy that I use for all external linking.
It makes sense to me to put the query string logic in this proxy.

So in the constructor, I check for a querystring, and then send a notification if it equals a predefined value.

One problem with this is that I'd like to predefine this query string key value I am checking against in an external xml file.

So another proxy, loads-parses this config xml, then the URL proxy checks against this.

Is there a better approach to what I am trying to do?



Logged
eco_bach
Courseware Beta
Sr. Member
***
Posts: 81


View Profile Email
« Reply #1 on: September 01, 2010, 02:53:11 »

Seems kind of kludgy, but this is working for me.
Would appreciate feedback.

1st need to ensure my popUpView has been added to the stage and let its mediator know. By default popUpView's alpha is 0 when 1st added to stage.

So, in my popUpView I dispatch a generic event when added.

Then in my popUpMediator's event handler I check for a predefined key value pair in my URLProxy.

if(urlProxy.parameters['promotion']=='1')openPopup();

Not sure if this is the 'best' approach, would appreciate any feedback.
« Last Edit: September 01, 2010, 02:55:01 by eco_bach » Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #2 on: September 07, 2010, 07:38:48 »

Is the popup used for anything other than the promotion?

If not, wouldn't it be better to check that URLProxy and only add the popup if the key is present?

-=Cliff>
Logged
Pages: [1]
Print