<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>SnippetRepoBrowser</title>
    <link>http://snippet.gnstudio.com/snippetrepobrowser/index</link>    
    <description>RSS Feed of SnippetRepoBrowser (Global RSS)</description>    
    <language>en-us</language>
    <pubDate>Thu, 09 Feb 2012 21:02:52 +0100</pubDate>
    <docs>SnippetRepoBrowser/index</docs>
    <generator>SnippetRepoBrowser Feed Generator</generator>
    <item>
      <title><![CDATA[Dispatch events between native windows]]></title>
      <link>http://snippet.gnstudio.com/viewtopic/19</link>
      <description><![CDATA[I was looking to a way to dispatch events between ultiple windows in an AIR application and, after I found on google only some solution that state to send a reference of the target for the event to the new window uing public properties, I came out with a more elegant solution that involves a new class added to nabiro.<br />The idea is that this class acts like a bridge on which is possible to register a DisplayObjetc for a specific message (i.e. the event type), the snippet represent only the simple usage of thebridge for register a new DisplayObject, attached there is the complete sample.<br />]]><![CDATA[<div class="divcode"><pre lang="actionscript">bridge = WindowsBridge.getInstance();<br />bridge.register(this, &quot;Test&quot;);<br />				<br />addEventListener(&quot;Test&quot;, onTest);<br /><br />// Window dispatch code<br />var test:WindowsBridge = WindowsBridge.getInstance();<br />					<br />test.dispatchEvent(new IntraWinComEvent(IntraWinComEvent.DEFAULT, new Event(&quot;Test&quot;)));</pre></div><br /><br />]]></description>
      <author>Giorgio Natili</author>
      <pubDate>Sun, 20 Sep 2009 20:00:29 +0200</pubDate>
      <category>Air</category>
      <guid>http://snippet.gnstudio.com/viewtopic/19</guid>
   </item>
  </channel>
</rss>
