<?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: Cairngorm Secret Tip #3: Responders for View Notifications</title>
	<atom:link href="http://www.gridlinked.info/cairngorm-secret-tip-3-responders-for-view-notifications/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gridlinked.info/cairngorm-secret-tip-3-responders-for-view-notifications/</link>
	<description>Patterns with Flex, RUX, and software</description>
	<lastBuildDate>Tue, 09 Mar 2010 14:45:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: thomasb</title>
		<link>http://www.gridlinked.info/cairngorm-secret-tip-3-responders-for-view-notifications/comment-page-1/#comment-217</link>
		<dc:creator>thomasb</dc:creator>
		<pubDate>Mon, 01 Mar 2010 15:45:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridlinked.info/?p=287#comment-217</guid>
		<description>Included in the open source code for CGX (Cairngorm Extensions) are the 2.2.1 adobe.cairngorm.* packages from the original framework. This inclusion is for developer convenience only! By including the Adobe base/parent code, developers are required only build/include the CGX swc into their applications. Of course you can delete the CGX com.adobe.cairngorm.* packages and use a separate SWC if desired. Please note also that the lastest Cairngorm 3 Beta has NOT been tested with the CGX extensions.

UPDATE: the &lt;a href=&quot;http://code.google.com/p/flexcairngorm/source/browse/#svn/trunk/code &quot; rel=&quot;nofollow&quot;&gt;CGX Framework&lt;/a&gt; source code has been updated with FlashBuilder 4 project settings.</description>
		<content:encoded><![CDATA[<p>Included in the open source code for CGX (Cairngorm Extensions) are the 2.2.1 adobe.cairngorm.* packages from the original framework. This inclusion is for developer convenience only! By including the Adobe base/parent code, developers are required only build/include the CGX swc into their applications. Of course you can delete the CGX com.adobe.cairngorm.* packages and use a separate SWC if desired. Please note also that the lastest Cairngorm 3 Beta has NOT been tested with the CGX extensions.</p>
<p>UPDATE: the <a href="http://code.google.com/p/flexcairngorm/source/browse/#svn/trunk/code " rel="nofollow">CGX Framework</a> source code has been updated with FlashBuilder 4 project settings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ricardo</title>
		<link>http://www.gridlinked.info/cairngorm-secret-tip-3-responders-for-view-notifications/comment-page-1/#comment-216</link>
		<dc:creator>ricardo</dc:creator>
		<pubDate>Mon, 01 Mar 2010 08:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridlinked.info/?p=287#comment-216</guid>
		<description>The last version of is 2.2.1 these extensions were included, I must place the extension + frk orginal or not??</description>
		<content:encoded><![CDATA[<p>The last version of is 2.2.1 these extensions were included, I must place the extension + frk orginal or not??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thomasb</title>
		<link>http://www.gridlinked.info/cairngorm-secret-tip-3-responders-for-view-notifications/comment-page-1/#comment-203</link>
		<dc:creator>thomasb</dc:creator>
		<pubDate>Wed, 24 Feb 2010 21:54:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridlinked.info/?p=287#comment-203</guid>
		<description>Matt,
You have asked a great question that really needs to be answered in a new blog: &quot; Flex View Coupling &amp; Events (Best Practices)&quot;... stay tuned for a full blog article with diagrams.
Meanwhile, remember the following:
1) Business events typically are dispatched directly to the biz layer. Data changes trigger their own event notifications so views update as a result of data changes.
2) Non-business events typically bubble to the immediate parent. 
3) Hidden events are also the &quot;magic&quot; that triggers databinding notifications to attached listeners. 
Parents can mediate activity between children views, or sibling/peer views can use databinding notations to directly coupling to properties of each other.
View coupling is something most people get complete wrong. Black-box couplings are signs of great developers.</description>
		<content:encoded><![CDATA[<p>Matt,<br />
You have asked a great question that really needs to be answered in a new blog: &#8221; Flex View Coupling &#038; Events (Best Practices)&#8221;&#8230; stay tuned for a full blog article with diagrams.<br />
Meanwhile, remember the following:<br />
1) Business events typically are dispatched directly to the biz layer. Data changes trigger their own event notifications so views update as a result of data changes.<br />
2) Non-business events typically bubble to the immediate parent.<br />
3) Hidden events are also the &#8220;magic&#8221; that triggers databinding notifications to attached listeners.<br />
Parents can mediate activity between children views, or sibling/peer views can use databinding notations to directly coupling to properties of each other.<br />
View coupling is something most people get complete wrong. Black-box couplings are signs of great developers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thomasb</title>
		<link>http://www.gridlinked.info/cairngorm-secret-tip-3-responders-for-view-notifications/comment-page-1/#comment-202</link>
		<dc:creator>thomasb</dc:creator>
		<pubDate>Wed, 24 Feb 2010 21:46:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridlinked.info/?p=287#comment-202</guid>
		<description>Oops. 
That is a typo... ApplicationInitializeEvent() is supposed to be the constructor public function LoadUserDetails() { ... }.
I will fix this is the code sample thanks.

ThomasB</description>
		<content:encoded><![CDATA[<p>Oops.<br />
That is a typo&#8230; ApplicationInitializeEvent() is supposed to be the constructor public function LoadUserDetails() { &#8230; }.<br />
I will fix this is the code sample thanks.</p>
<p>ThomasB</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thomasb</title>
		<link>http://www.gridlinked.info/cairngorm-secret-tip-3-responders-for-view-notifications/comment-page-1/#comment-201</link>
		<dc:creator>thomasb</dc:creator>
		<pubDate>Wed, 24 Feb 2010 21:44:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridlinked.info/?p=287#comment-201</guid>
		<description>Nguyen,

Do not use the ObjectUtil.copy() method. You simply copy the reference to the interface.
Here is a better refactoring for your business event class:

public class SequenceEvent extends CairngormEvent {
    public function SequenceEvent(type:String, responder:IResponder=null) {
         super(type,false,false);
         this.responder = responder;
    }
   
    override pubic funciton clone():Event {
       return new SequenceEvent(type,responder);
    }
}

Note that you do NOT need to implement clone() unless you are expecting the event to bubble in the display hierachy.
If you are dispatching directly to the business layer [using for example UMEvent::dispatch()] then clone() is not required.</description>
		<content:encoded><![CDATA[<p>Nguyen,</p>
<p>Do not use the ObjectUtil.copy() method. You simply copy the reference to the interface.<br />
Here is a better refactoring for your business event class:</p>
<p>public class SequenceEvent extends CairngormEvent {<br />
    public function SequenceEvent(type:String, responder:IResponder=null) {<br />
         super(type,false,false);<br />
         this.responder = responder;<br />
    }</p>
<p>    override pubic funciton clone():Event {<br />
       return new SequenceEvent(type,responder);<br />
    }<br />
}</p>
<p>Note that you do NOT need to implement clone() unless you are expecting the event to bubble in the display hierachy.<br />
If you are dispatching directly to the business layer [using for example UMEvent::dispatch()] then clone() is not required.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Clifford</title>
		<link>http://www.gridlinked.info/cairngorm-secret-tip-3-responders-for-view-notifications/comment-page-1/#comment-196</link>
		<dc:creator>Matthew Clifford</dc:creator>
		<pubDate>Tue, 23 Feb 2010 17:21:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridlinked.info/?p=287#comment-196</guid>
		<description>Hi Thomas,

I&#039;ve successfully implemented the extensions into my Flex project, and am really pleased with it. My views can now all receive specific event notifications, which is great.

One question to follow up, what is the correct best practice method for one view to directly dispatch an event to another view?

Should the views have event listeners (which seems wrong to me in basic MVC terms), or should I go through the command layer and back again? If so, how would you suggest going about this, in simple terms?

Kind regards,

Matthew</description>
		<content:encoded><![CDATA[<p>Hi Thomas,</p>
<p>I&#8217;ve successfully implemented the extensions into my Flex project, and am really pleased with it. My views can now all receive specific event notifications, which is great.</p>
<p>One question to follow up, what is the correct best practice method for one view to directly dispatch an event to another view?</p>
<p>Should the views have event listeners (which seems wrong to me in basic MVC terms), or should I go through the command layer and back again? If so, how would you suggest going about this, in simple terms?</p>
<p>Kind regards,</p>
<p>Matthew</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nguyen</title>
		<link>http://www.gridlinked.info/cairngorm-secret-tip-3-responders-for-view-notifications/comment-page-1/#comment-195</link>
		<dc:creator>Nguyen</dc:creator>
		<pubDate>Mon, 22 Feb 2010 16:56:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridlinked.info/?p=287#comment-195</guid>
		<description>Hi Thomas,

Thanks for your great article. I have tried your method by passing responder from view class to customer event class. However, I always get error when I tried to re-dispatch event. I already override clone() method in my custom event class but still.

// Custom Event Class - clone() method
package com.mydomain
{
    import com.adobe.cairngorm.control.CairngormEvent;
    import flash.events.Event;
    import mx.rpc.IResponder;
    import mx.rpc.Responder;
    import mx.utils.ObjectUtil;

    public class SequenceEvent extends CairngormEvent
    {

        // Responder
        public var responder:IResponder;

        // Constructor

        public function SequenceEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false)
        {
            super(type, bubbles, cancelable);
        }

        // Override

        override public function clone():Event
        {
            var sequenceEvent:SequenceEvent = new SequenceEvent(type, bubbles, cancelable);
            sequenceEvent.responder = ObjectUtil.copy(responder) as IResponder;

            return sequenceEvent;
        }
    }
}

do you know what I&#039;m doing wrong in here?

Thanks</description>
		<content:encoded><![CDATA[<p>Hi Thomas,</p>
<p>Thanks for your great article. I have tried your method by passing responder from view class to customer event class. However, I always get error when I tried to re-dispatch event. I already override clone() method in my custom event class but still.</p>
<p>// Custom Event Class &#8211; clone() method<br />
package com.mydomain<br />
{<br />
    import com.adobe.cairngorm.control.CairngormEvent;<br />
    import flash.events.Event;<br />
    import mx.rpc.IResponder;<br />
    import mx.rpc.Responder;<br />
    import mx.utils.ObjectUtil;</p>
<p>    public class SequenceEvent extends CairngormEvent<br />
    {</p>
<p>        // Responder<br />
        public var responder:IResponder;</p>
<p>        // Constructor</p>
<p>        public function SequenceEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false)<br />
        {<br />
            super(type, bubbles, cancelable);<br />
        }</p>
<p>        // Override</p>
<p>        override public function clone():Event<br />
        {<br />
            var sequenceEvent:SequenceEvent = new SequenceEvent(type, bubbles, cancelable);<br />
            sequenceEvent.responder = ObjectUtil.copy(responder) as IResponder;</p>
<p>            return sequenceEvent;<br />
        }<br />
    }<br />
}</p>
<p>do you know what I&#8217;m doing wrong in here?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Clifford</title>
		<link>http://www.gridlinked.info/cairngorm-secret-tip-3-responders-for-view-notifications/comment-page-1/#comment-194</link>
		<dc:creator>Matthew Clifford</dc:creator>
		<pubDate>Fri, 19 Feb 2010 17:59:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridlinked.info/?p=287#comment-194</guid>
		<description>Thanks again...

Could you explain in a little more detail the ApplicationInitializeEvent() method within the LoadUserDetails event class that you have created?

How or where is that method called?

Matthew</description>
		<content:encoded><![CDATA[<p>Thanks again&#8230;</p>
<p>Could you explain in a little more detail the ApplicationInitializeEvent() method within the LoadUserDetails event class that you have created?</p>
<p>How or where is that method called?</p>
<p>Matthew</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thomasb</title>
		<link>http://www.gridlinked.info/cairngorm-secret-tip-3-responders-for-view-notifications/comment-page-1/#comment-193</link>
		<dc:creator>thomasb</dc:creator>
		<pubDate>Thu, 18 Feb 2010 22:57:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridlinked.info/?p=287#comment-193</guid>
		<description>Matthew,
The best way to checkout the source code is using an SVN client; either standalone or a plugin to Eclipse/Flexbuilder. 

Go to this page for &lt;a href=&quot;http://code.google.com/p/flexcairngorm/source/checkout&quot; rel=&quot;nofollow&quot;&gt;SVN checkout&lt;/a&gt; details. See the &lt;a href=&quot;http://code.google.com/p/flexcairngorm/source/browse/#svn/trunk/downloads&quot; rel=&quot;nofollow&quot;&gt;downloads section&lt;/a&gt; for quick downloads also. Or you can directly download the &lt;a href=&quot;http://flexcairngorm.googlecode.com/svn/trunk/downloads/CairngormExtensions.swc&quot; rel=&quot;nofollow&quot;&gt;SWC library&lt;/a&gt; or the full archive/zip of the &lt;a href=&quot;http://flexcairngorm.googlecode.com/svn/trunk/downloads/fb4_projectAndSrc.zip&quot; rel=&quot;nofollow&quot;&gt;Flashbuilder 4 library project&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Matthew,<br />
The best way to checkout the source code is using an SVN client; either standalone or a plugin to Eclipse/Flexbuilder. </p>
<p>Go to this page for <a href="http://code.google.com/p/flexcairngorm/source/checkout" rel="nofollow">SVN checkout</a> details. See the <a href="http://code.google.com/p/flexcairngorm/source/browse/#svn/trunk/downloads" rel="nofollow">downloads section</a> for quick downloads also. Or you can directly download the <a href="http://flexcairngorm.googlecode.com/svn/trunk/downloads/CairngormExtensions.swc" rel="nofollow">SWC library</a> or the full archive/zip of the <a href="http://flexcairngorm.googlecode.com/svn/trunk/downloads/fb4_projectAndSrc.zip" rel="nofollow">Flashbuilder 4 library project</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Clifford</title>
		<link>http://www.gridlinked.info/cairngorm-secret-tip-3-responders-for-view-notifications/comment-page-1/#comment-192</link>
		<dc:creator>Matthew Clifford</dc:creator>
		<pubDate>Thu, 18 Feb 2010 20:17:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridlinked.info/?p=287#comment-192</guid>
		<description>Hi Thomas,

Superb article, thank you...

Is there an easy way, or rather how do we actually correctly download the latest source for Cairngorm Extensions?

From the website, I can browse each file, but I can&#039;t find a downloadable zip of everything?

Many thanks,

Matt</description>
		<content:encoded><![CDATA[<p>Hi Thomas,</p>
<p>Superb article, thank you&#8230;</p>
<p>Is there an easy way, or rather how do we actually correctly download the latest source for Cairngorm Extensions?</p>
<p>From the website, I can browse each file, but I can&#8217;t find a downloadable zip of everything?</p>
<p>Many thanks,</p>
<p>Matt</p>
]]></content:encoded>
	</item>
</channel>
</rss>
