<?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: Flex2 External Interface Bug</title>
	<atom:link href="http://blog.gtuhl.com/2007/03/08/flex2-external-interface-bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.gtuhl.com/2007/03/08/flex2-external-interface-bug/</link>
	<description>Development, IT, Gadgets, and Startups</description>
	<lastBuildDate>Mon, 15 Aug 2011 08:57:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Keshav Prasad</title>
		<link>http://blog.gtuhl.com/2007/03/08/flex2-external-interface-bug/comment-page-1/#comment-134</link>
		<dc:creator>Keshav Prasad</dc:creator>
		<pubDate>Thu, 17 Jan 2008 10:11:50 +0000</pubDate>
		<guid isPermaLink="false">http://gtuhl.nfshost.com/blog/?p=8#comment-134</guid>
		<description>Hi gtuhl,

I am a web developer working on flex. I am right now working on executing a DWR function from javascript in my flex application. After reading your post, I got an idea of making DWR calls from javascript by calling that related js function frm .html file generated by the .mxml file. 

But, the DWRengine.execute method is not getting executed.

this is the function i wrote and i am calling from flex usign ExternalInterface.call 


 function dwr_call()
{	
	alert(&quot;Inside DWR+CALL&quot;);
 	 DWREngine._execute(&#039;../WEB-INF/dwr&#039;, &#039;documentUtil&#039;, &#039;getAllDocumentTemplates&#039;, {
            callback:function(data)
            {
                if (data) {
                    alert(data);

                }
            },
            errorHandler:function(errorString, exception)
            {

            }, async:true
        });
}

and the flex_dwr.mxml


&lt;!-- wrapper/WrapperCaller.mxml --&gt;

  
     import flash.external.*;
  
     public function callWrapper():void {
        var s:String;
        if (ExternalInterface.available) {
           var wrapperFunction:String = &quot;dwr_call&quot;;
           s = ExternalInterface.call(wrapperFunction,ti1.text);
        } else {
           s = &quot;Wrapper not available&quot;;
        }
        trace(s); 
     }
  
  
  
     
        
     
  
  
  


Any Suggestions or help 

Thanks in Advance,
Keshav.</description>
		<content:encoded><![CDATA[<p>Hi gtuhl,</p>
<p>I am a web developer working on flex. I am right now working on executing a DWR function from javascript in my flex application. After reading your post, I got an idea of making DWR calls from javascript by calling that related js function frm .html file generated by the .mxml file. </p>
<p>But, the DWRengine.execute method is not getting executed.</p>
<p>this is the function i wrote and i am calling from flex usign ExternalInterface.call </p>
<p> function dwr_call()<br />
{<br />
	alert(&#8220;Inside DWR+CALL&#8221;);<br />
 	 DWREngine._execute(&#8216;../WEB-INF/dwr&#8217;, &#8216;documentUtil&#8217;, &#8216;getAllDocumentTemplates&#8217;, {<br />
            callback:function(data)<br />
            {<br />
                if (data) {<br />
                    alert(data);</p>
<p>                }<br />
            },<br />
            errorHandler:function(errorString, exception)<br />
            {</p>
<p>            }, async:true<br />
        });<br />
}</p>
<p>and the flex_dwr.mxml</p>
<p><!-- wrapper/WrapperCaller.mxml --></p>
<p>     import flash.external.*;</p>
<p>     public function callWrapper():void {<br />
        var s:String;<br />
        if (ExternalInterface.available) {<br />
           var wrapperFunction:String = &#8220;dwr_call&#8221;;<br />
           s = ExternalInterface.call(wrapperFunction,ti1.text);<br />
        } else {<br />
           s = &#8220;Wrapper not available&#8221;;<br />
        }<br />
        trace(s);<br />
     }</p>
<p>Any Suggestions or help </p>
<p>Thanks in Advance,<br />
Keshav.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Mignard &#187; Blog Archive &#187; Wow - it&#8217;s been a long month&#8230;</title>
		<link>http://blog.gtuhl.com/2007/03/08/flex2-external-interface-bug/comment-page-1/#comment-120</link>
		<dc:creator>Paul Mignard &#187; Blog Archive &#187; Wow - it&#8217;s been a long month&#8230;</dc:creator>
		<pubDate>Mon, 10 Dec 2007 03:01:30 +0000</pubDate>
		<guid isPermaLink="false">http://gtuhl.nfshost.com/blog/?p=8#comment-120</guid>
		<description>[...] sentence) expert but I couldn&#8217;t not find a consistent way to make these work and the only place I could find that made it work wasn&#8217;t really happy with it and eventually abandoned it. So [...]</description>
		<content:encoded><![CDATA[<p>[...] sentence) expert but I couldn&#8217;t not find a consistent way to make these work and the only place I could find that made it work wasn&#8217;t really happy with it and eventually abandoned it. So [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gtuhl</title>
		<link>http://blog.gtuhl.com/2007/03/08/flex2-external-interface-bug/comment-page-1/#comment-67</link>
		<dc:creator>gtuhl</dc:creator>
		<pubDate>Tue, 07 Aug 2007 15:44:16 +0000</pubDate>
		<guid isPermaLink="false">http://gtuhl.nfshost.com/blog/?p=8#comment-67</guid>
		<description>Hey Seb,

Thanks for commenting.  Matt, a Flex PM commented on another one of my posts here:

http://blog.gtuhl.com/2007/03/28/flex2-opinions/#comment-23

Here is the relevant piece:

---------------
The ExternalInterface bug is in the Player and we have it opened to fix in the next major Player release. I am investigating whether we could push that up sooner, though I realize you’ve already moved on and it won’t make a difference for you guys but could for others.
---------------

So it turns out to not be an issue with Flex specifically, it is an issue with the Flash Player.  Unfortunately it seems this would mean not only would the bug need to be fixed and a patch released, but any users of your code would have to update their Flash Players.

You could also just be very careful with property names to ensure they don&#039;t repeat within a complex object but it seems this would carry a high chance of an accidental, possibly hard to debug issue in your software.

Good luck with your project and DWR,

Joe</description>
		<content:encoded><![CDATA[<p>Hey Seb,</p>
<p>Thanks for commenting.  Matt, a Flex PM commented on another one of my posts here:</p>
<p><a href="http://blog.gtuhl.com/2007/03/28/flex2-opinions/#comment-23" rel="nofollow">http://blog.gtuhl.com/2007/03/28/flex2-opinions/#comment-23</a></p>
<p>Here is the relevant piece:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;<br />
The ExternalInterface bug is in the Player and we have it opened to fix in the next major Player release. I am investigating whether we could push that up sooner, though I realize you’ve already moved on and it won’t make a difference for you guys but could for others.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>So it turns out to not be an issue with Flex specifically, it is an issue with the Flash Player.  Unfortunately it seems this would mean not only would the bug need to be fixed and a patch released, but any users of your code would have to update their Flash Players.</p>
<p>You could also just be very careful with property names to ensure they don&#8217;t repeat within a complex object but it seems this would carry a high chance of an accidental, possibly hard to debug issue in your software.</p>
<p>Good luck with your project and DWR,</p>
<p>Joe</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seb</title>
		<link>http://blog.gtuhl.com/2007/03/08/flex2-external-interface-bug/comment-page-1/#comment-66</link>
		<dc:creator>Seb</dc:creator>
		<pubDate>Tue, 07 Aug 2007 15:31:39 +0000</pubDate>
		<guid isPermaLink="false">http://gtuhl.nfshost.com/blog/?p=8#comment-66</guid>
		<description>I am very interested by using Flex with a DWR beckend.
Do you know if this bug has been corrected in Flex 3 beta ?</description>
		<content:encoded><![CDATA[<p>I am very interested by using Flex with a DWR beckend.<br />
Do you know if this bug has been corrected in Flex 3 beta ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Beynart</title>
		<link>http://blog.gtuhl.com/2007/03/08/flex2-external-interface-bug/comment-page-1/#comment-54</link>
		<dc:creator>Tim Beynart</dc:creator>
		<pubDate>Wed, 02 May 2007 18:42:03 +0000</pubDate>
		<guid isPermaLink="false">http://gtuhl.nfshost.com/blog/?p=8#comment-54</guid>
		<description>I come from a Flash application development background.  One reason you may not have gotten much response about this is the standard approach to Flash Player data handling.  Usually when a decisioon is made about data transfer, the choices are XML of some flavor or the binary AMF format. External Interface is reserved for local JavaScript communication like passing events back and forth form the player to the browser environment.  In other words, it is rare that anyone would be using Javascript as a proxy to a remote service and therefore would not be passing complex objects through EI. There is a distinct possibility that you are the first developer to find this bug.
I understand from your blog that you have moved on, but this may explain the echo chamber you faced with your issues...  good luck!</description>
		<content:encoded><![CDATA[<p>I come from a Flash application development background.  One reason you may not have gotten much response about this is the standard approach to Flash Player data handling.  Usually when a decisioon is made about data transfer, the choices are XML of some flavor or the binary AMF format. External Interface is reserved for local JavaScript communication like passing events back and forth form the player to the browser environment.  In other words, it is rare that anyone would be using Javascript as a proxy to a remote service and therefore would not be passing complex objects through EI. There is a distinct possibility that you are the first developer to find this bug.<br />
I understand from your blog that you have moved on, but this may explain the echo chamber you faced with your issues&#8230;  good luck!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

