<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Handling Popup Logic in PureMVC *Update*</title>
	<atom:link href="http://www.newtriks.com/?feed=rss2&#038;p=329" rel="self" type="application/rss+xml" />
	<link>http://www.newtriks.com/?p=329</link>
	<description>Flex, Flash &#38; AIR Development</description>
	<lastBuildDate>Sun, 05 Sep 2010 01:10:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Dave</title>
		<link>http://www.newtriks.com/?p=329&#038;cpage=1#comment-31464</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 27 May 2010 15:53:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=329#comment-31464</guid>
		<description>Hi Simon,
Just tried implementing your code but keep getting this error:
&quot;TypeError: Error #1009: Cannot access a property or method of a null object reference.&quot;
At the line:
&quot;PopManager.openPopUpWindow( ApplicationFacade.getInstance( this.multitonKey ),
                                            CustomPop,
                                            CustomPopMediator,
                                            true,
                                                0, 0,
                                            &quot;custom_pop&quot;,
                                            true );&quot;
In the PopManager class.
Obviously I&#039;ve modified this all to fit in with my existing app.
It would appear that the something hasn&#039;t finished being initiated before it&#039;s being called. But, I&#039;ve tried tracing it all out and can&#039;t spot anything wrong.
Any ideas? Has the PureMVC swc been updated since this demo?
Thanks!</description>
		<content:encoded><![CDATA[<p>Hi Simon,<br />
Just tried implementing your code but keep getting this error:<br />
&#8220;TypeError: Error #1009: Cannot access a property or method of a null object reference.&#8221;<br />
At the line:<br />
&#8220;PopManager.openPopUpWindow( ApplicationFacade.getInstance( this.multitonKey ),<br />
                                            CustomPop,<br />
                                            CustomPopMediator,<br />
                                            true,<br />
                                                0, 0,<br />
                                            &#8220;custom_pop&#8221;,<br />
                                            true );&#8221;<br />
In the PopManager class.<br />
Obviously I&#8217;ve modified this all to fit in with my existing app.<br />
It would appear that the something hasn&#8217;t finished being initiated before it&#8217;s being called. But, I&#8217;ve tried tracing it all out and can&#8217;t spot anything wrong.<br />
Any ideas? Has the PureMVC swc been updated since this demo?<br />
Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AJ Simon</title>
		<link>http://www.newtriks.com/?p=329&#038;cpage=1#comment-31026</link>
		<dc:creator>AJ Simon</dc:creator>
		<pubDate>Wed, 07 Apr 2010 17:17:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=329#comment-31026</guid>
		<description>i had to make a few adjustments to this but.... this worked like a charm and saved me a ton of time!</description>
		<content:encoded><![CDATA[<p>i had to make a few adjustments to this but&#8230;. this worked like a charm and saved me a ton of time!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention Handling Popup Logic in PureMVC *Update* -- Topsy.com</title>
		<link>http://www.newtriks.com/?p=329&#038;cpage=1#comment-31025</link>
		<dc:creator>Tweets that mention Handling Popup Logic in PureMVC *Update* -- Topsy.com</dc:creator>
		<pubDate>Wed, 07 Apr 2010 13:30:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=329#comment-31025</guid>
		<description>[...] This post was mentioned on Twitter by Dennis Plucinik. Dennis Plucinik said: Reading: Handling Popup Logic in PureMVC *Update*: http://bit.ly/bdYLos [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Dennis Plucinik. Dennis Plucinik said: Reading: Handling Popup Logic in PureMVC *Update*: <a href="http://bit.ly/bdYLos" rel="nofollow">http://bit.ly/bdYLos</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.newtriks.com/?p=329&#038;cpage=1#comment-30624</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Thu, 17 Sep 2009 19:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=329#comment-30624</guid>
		<description>Ok, got it thanks.

So, if I want the popup to appear at the top and direct center (horiz) of a certain component on stage, how would I go about doing that.

So I click a component on screen, say a sprite,  I want my popup to appear 10 pixels above the component I clicked and centered horiz over the clicked component?

Any suggestions?</description>
		<content:encoded><![CDATA[<p>Ok, got it thanks.</p>
<p>So, if I want the popup to appear at the top and direct center (horiz) of a certain component on stage, how would I go about doing that.</p>
<p>So I click a component on screen, say a sprite,  I want my popup to appear 10 pixels above the component I clicked and centered horiz over the clicked component?</p>
<p>Any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: newtriks</title>
		<link>http://www.newtriks.com/?p=329&#038;cpage=1#comment-30615</link>
		<dc:creator>newtriks</dc:creator>
		<pubDate>Fri, 11 Sep 2009 18:10:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=329#comment-30615</guid>
		<description>So you want to load a popup on application creation complete, do you mean without any user interaction?  It depends on your setup a suggestion would be to use your startup command to fire off the HANDLE_POP notification, or onRegister() in your ApplicationMediator, etc.....  Is this what you mean?</description>
		<content:encoded><![CDATA[<p>So you want to load a popup on application creation complete, do you mean without any user interaction?  It depends on your setup a suggestion would be to use your startup command to fire off the HANDLE_POP notification, or onRegister() in your ApplicationMediator, etc&#8230;..  Is this what you mean?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.newtriks.com/?p=329&#038;cpage=1#comment-30614</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Fri, 11 Sep 2009 17:53:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=329#comment-30614</guid>
		<description>So when I use these classes and I have my popup dispatching and event the mediator doesn&#039;t hear the event.  If I attach an eventlistener on the main stage to listen for the events from the popup the stage hears the events.

Here is how I instantiate the popup from the stage.

var pObj:PopDataVO = new PopDataVO();
   				pObj.type = ChooseViewIntroPanel.CHOOSE_VIEW_INTRO_PANEL;
   				
				facade.sendNotification( ApplicationFacade.HANDLE_POP, pObj, ResourceConstants.OPEN_POP ); 

You might say you shouldn&#039;t do that from the stage, but rather from a command or another mediator like the stageMediator. 

The issue is this popup is the firs thing that happens when the app loads.  Think of a popup you get in dreamweaver or photoshop.

J</description>
		<content:encoded><![CDATA[<p>So when I use these classes and I have my popup dispatching and event the mediator doesn&#8217;t hear the event.  If I attach an eventlistener on the main stage to listen for the events from the popup the stage hears the events.</p>
<p>Here is how I instantiate the popup from the stage.</p>
<p>var pObj:PopDataVO = new PopDataVO();<br />
   				pObj.type = ChooseViewIntroPanel.CHOOSE_VIEW_INTRO_PANEL;</p>
<p>				facade.sendNotification( ApplicationFacade.HANDLE_POP, pObj, ResourceConstants.OPEN_POP ); </p>
<p>You might say you shouldn&#8217;t do that from the stage, but rather from a command or another mediator like the stageMediator. </p>
<p>The issue is this popup is the firs thing that happens when the app loads.  Think of a popup you get in dreamweaver or photoshop.</p>
<p>J</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yeremy</title>
		<link>http://www.newtriks.com/?p=329&#038;cpage=1#comment-30582</link>
		<dc:creator>yeremy</dc:creator>
		<pubDate>Mon, 03 Aug 2009 16:25:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=329#comment-30582</guid>
		<description>Thanks! :)</description>
		<content:encoded><![CDATA[<p>Thanks! <img src='http://www.newtriks.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: newtriks</title>
		<link>http://www.newtriks.com/?p=329&#038;cpage=1#comment-30578</link>
		<dc:creator>newtriks</dc:creator>
		<pubDate>Wed, 22 Jul 2009 13:19:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=329#comment-30578</guid>
		<description>well have one view component with  2 viewStates and when you inject the data pass a param to define the state to show, easy ;)</description>
		<content:encoded><![CDATA[<p>well have one view component with  2 viewStates and when you inject the data pass a param to define the state to show, easy <img src='http://www.newtriks.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Claudiu</title>
		<link>http://www.newtriks.com/?p=329&#038;cpage=1#comment-30577</link>
		<dc:creator>Claudiu</dc:creator>
		<pubDate>Wed, 22 Jul 2009 12:51:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=329#comment-30577</guid>
		<description>Ok so if I have a message pop-up and a login pop-up I want both of them to be handled by the same mediator instead of writing 2 mediators since i can extend the case from command. I just want to use this for showing and hiding them ... Each op-ups will have the business logic handled outside this ... wel maybe the message will be injected with data when called but aside from that i don&#039;t see why register 2 mediators when I can show and hide different pop-ups with just one... If I had 2 mediators, the only place where one will be different from the other will be the getter that casts to the to the actual view component and the component class ref ... Am I making sense here?

C</description>
		<content:encoded><![CDATA[<p>Ok so if I have a message pop-up and a login pop-up I want both of them to be handled by the same mediator instead of writing 2 mediators since i can extend the case from command. I just want to use this for showing and hiding them &#8230; Each op-ups will have the business logic handled outside this &#8230; wel maybe the message will be injected with data when called but aside from that i don&#8217;t see why register 2 mediators when I can show and hide different pop-ups with just one&#8230; If I had 2 mediators, the only place where one will be different from the other will be the getter that casts to the to the actual view component and the component class ref &#8230; Am I making sense here?</p>
<p>C</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: newtriks</title>
		<link>http://www.newtriks.com/?p=329&#038;cpage=1#comment-30576</link>
		<dc:creator>newtriks</dc:creator>
		<pubDate>Wed, 22 Jul 2009 12:37:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=329#comment-30576</guid>
		<description>Currently the only potential repetition is the code in the switch statement i.e. for checking if the popup mediator is registered and then calling the PopManager.openPopUpWindow() method which is minor.  That complete means you now have the popup either registered or unregistered with the facade.  The final code snippets at the end of my post show how to open and close a popup and you would only need to change the body() attribute of the notification for each popup you want to open/close.  So unless I am completely misunderstanding you there should be  minimal duplicate code.</description>
		<content:encoded><![CDATA[<p>Currently the only potential repetition is the code in the switch statement i.e. for checking if the popup mediator is registered and then calling the PopManager.openPopUpWindow() method which is minor.  That complete means you now have the popup either registered or unregistered with the facade.  The final code snippets at the end of my post show how to open and close a popup and you would only need to change the body() attribute of the notification for each popup you want to open/close.  So unless I am completely misunderstanding you there should be  minimal duplicate code.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
