<?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: Adobe Flex RoR SDK</title>
	<atom:link href="http://flexonrails.net/?feed=rss2&#038;p=12" rel="self" type="application/rss+xml" />
	<link>http://flexonrails.net/?p=12</link>
	<description>-</description>
	<lastBuildDate>Tue, 22 Dec 2009 16:08:15 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ajay</title>
		<link>http://flexonrails.net/?p=12&#038;cpage=1#comment-56038</link>
		<dc:creator>Ajay</dc:creator>
		<pubDate>Tue, 08 Apr 2008 09:03:14 +0000</pubDate>
		<guid isPermaLink="false">http://flexonrails.net/?p=12#comment-56038</guid>
		<description>mxml files i used:

-----------------PdfStore.mxml----------------











 

------------UploadPdf.mxml---------------------





        
                
        

        

        
                
                        
                                
                                

                        &lt;!--mx:Button id=&quot;browseButton&quot; label=&quot;Browse&quot; click=&quot;openf()&quot;/--&gt;
                        

                

                
                        
                                        

                
        
</description>
		<content:encoded><![CDATA[<p>mxml files i used:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;PdfStore.mxml&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>&#8212;&#8212;&#8212;&#8212;UploadPdf.mxml&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>                        <!--mx:Button id="browseButton" label="Browse" click="openf()"/--></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ajay</title>
		<link>http://flexonrails.net/?p=12&#038;cpage=1#comment-56037</link>
		<dc:creator>Ajay</dc:creator>
		<pubDate>Tue, 08 Apr 2008 08:50:24 +0000</pubDate>
		<guid isPermaLink="false">http://flexonrails.net/?p=12#comment-56037</guid>
		<description>I am new to this technology. I am using code from given examples in SDK with flex 3, actionscript 3 and rails for embedding upload functionality in my application. But I am getting the IO error at run time when i run it from flex builder. And when i run it using ruby script/server it runs without any error but doesn&#039;t write any file on disk. Please help me fixing this bug.
               Code i used is:

---------------------------application.rb------------------------

# Filters added to this controller apply to all controllers in the
application.
# Likewise, all the methods added will be available for all
controllers.

class ApplicationController  &#039;3a8f77511f4633ed7c0cb6065d614fec&#039;

     def upload_file
      file_data = params[:Filedata]
      file_name = params[:Filename].to_s
      file_path = params[:folder].to_s
      File.open(file_path + &quot;/&quot; + file_name, &quot;wb&quot;) { &#124;new_file&#124;
new_file.write(file_data.read) }
      render(:xml =&gt; &quot;&quot;)
    end
end

------------------------PdfStore.mxml----------------













----------------------------------UploadPdf.mxml---------------------




        
                
        

        

        
                
                        
                                
                                

                        &lt;!--mx:Button id=&quot;browseButton&quot; label=&quot;Browse&quot; click=&quot;openf()&quot;/--&gt;
                        

                

                
                        
                                        

                
        


--------------------------------
uploadScript.as--------------------------

// ActionScript file

        private var uploadFileRefList:FileReferenceList = new
FileReferenceList();
        private var uploadURL:URLRequest = new URLRequest(&quot;http://localhost:
3000/application/upload_file&quot;);

        private function uploadFiles():void
        {
                uploadFileRefList.addEventListener(Event.SELECT,
uploadSelectHandler);

                try {
                        var success:Boolean = uploadFileRefList.browse();
                } catch (error:Error) {
                        trace(&quot;Unable to browse for files. &quot; + error);
                }
        }

        private function doUpload(file:FileReference):void
        {
                file.addEventListener(Event.COMPLETE, uploadCompleteHandler);
                file.addEventListener(IOErrorEvent.IO_ERROR, uploadIoErrorHandler);
                file.addEventListener(ProgressEvent.PROGRESS,
uploadProgressHandler);

                var variables:URLVariables = new URLVariables();
            variables.folder = &quot;public/&quot; + fileFolder;//bin/
            uploadURL.data = variables;

                try {
                file.upload(uploadURL);

            } catch (error:Error) {
                trace(&quot;Unable to upload file. &quot; + error);
            }

        }

        private function uploadSelectHandler(event:Event):void
        {

                for each (var file:FileReference in uploadFileRefList.fileList)
                        filesToUpload.addItem(file.name);

                doUpload(uploadFileRefList.fileList[0]);

        }

        private function uploadProgressHandler (event:ProgressEvent):void
        {
                pb.label = &quot;Uploading &quot; + event.currentTarget.name + &quot; &quot; +
Math.floor((event.bytesLoaded/event.bytesTotal)*100) + &quot;% complete&quot;;
                pb.setProgress(event.bytesLoaded, event.bytesTotal);
        }
        private function uploadIoErrorHandler (event:Event):void
        {
                trace (&quot;Upload failed: &quot; + event);
        }
        private function uploadCompleteHandler (event:Event):void
        {
                uploadedFiles.addItem(event.currentTarget.name);

                filesToUpload.removeItemAt(0);

                uploadFileRefList.fileList.splice(0, 1);

                if (filesToUpload.length == 0)
                {
                        pb.label = &quot;LOADING 0%&quot;;
                        pb.setProgress(0, 0);
                        event.currentTarget.removeEventListener(Event.COMPLETE,
uploadCompleteHandler);
                        event.currentTarget.removeEventListener(IOErrorEvent.IO_ERROR,
uploadIoErrorHandler);
                        event.currentTarget.removeEventListener(ProgressEvent.PROGRESS,
uploadProgressHandler);
                }
                else
                {
                        doUpload(uploadFileRefList.fileList[0]);
                }

        }</description>
		<content:encoded><![CDATA[<p>I am new to this technology. I am using code from given examples in SDK with flex 3, actionscript 3 and rails for embedding upload functionality in my application. But I am getting the IO error at run time when i run it from flex builder. And when i run it using ruby script/server it runs without any error but doesn&#8217;t write any file on disk. Please help me fixing this bug.<br />
               Code i used is:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;application.rb&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p># Filters added to this controller apply to all controllers in the<br />
application.<br />
# Likewise, all the methods added will be available for all<br />
controllers.</p>
<p>class ApplicationController  &#8216;3a8f77511f4633ed7c0cb6065d614fec&#8217;</p>
<p>     def upload_file<br />
      file_data = params[:Filedata]<br />
      file_name = params[:Filename].to_s<br />
      file_path = params[:folder].to_s<br />
      File.open(file_path + &#8220;/&#8221; + file_name, &#8220;wb&#8221;) { |new_file|<br />
new_file.write(file_data.read) }<br />
      render(:xml =&gt; &#8220;&#8221;)<br />
    end<br />
end</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;PdfStore.mxml&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-UploadPdf.mxml&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>                        <!--mx:Button id="browseButton" label="Browse" click="openf()"/--></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
uploadScript.as&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>// ActionScript file</p>
<p>        private var uploadFileRefList:FileReferenceList = new<br />
FileReferenceList();<br />
        private var uploadURL:URLRequest = new URLRequest(&#8221;http://localhost:<br />
3000/application/upload_file&#8221;);</p>
<p>        private function uploadFiles():void<br />
        {<br />
                uploadFileRefList.addEventListener(Event.SELECT,<br />
uploadSelectHandler);</p>
<p>                try {<br />
                        var success:Boolean = uploadFileRefList.browse();<br />
                } catch (error:Error) {<br />
                        trace(&#8221;Unable to browse for files. &#8221; + error);<br />
                }<br />
        }</p>
<p>        private function doUpload(file:FileReference):void<br />
        {<br />
                file.addEventListener(Event.COMPLETE, uploadCompleteHandler);<br />
                file.addEventListener(IOErrorEvent.IO_ERROR, uploadIoErrorHandler);<br />
                file.addEventListener(ProgressEvent.PROGRESS,<br />
uploadProgressHandler);</p>
<p>                var variables:URLVariables = new URLVariables();<br />
            variables.folder = &#8220;public/&#8221; + fileFolder;//bin/<br />
            uploadURL.data = variables;</p>
<p>                try {<br />
                file.upload(uploadURL);</p>
<p>            } catch (error:Error) {<br />
                trace(&#8221;Unable to upload file. &#8221; + error);<br />
            }</p>
<p>        }</p>
<p>        private function uploadSelectHandler(event:Event):void<br />
        {</p>
<p>                for each (var file:FileReference in uploadFileRefList.fileList)<br />
                        filesToUpload.addItem(file.name);</p>
<p>                doUpload(uploadFileRefList.fileList[0]);</p>
<p>        }</p>
<p>        private function uploadProgressHandler (event:ProgressEvent):void<br />
        {<br />
                pb.label = &#8220;Uploading &#8221; + event.currentTarget.name + &#8221; &#8221; +<br />
Math.floor((event.bytesLoaded/event.bytesTotal)*100) + &#8220;% complete&#8221;;<br />
                pb.setProgress(event.bytesLoaded, event.bytesTotal);<br />
        }<br />
        private function uploadIoErrorHandler (event:Event):void<br />
        {<br />
                trace (&#8221;Upload failed: &#8221; + event);<br />
        }<br />
        private function uploadCompleteHandler (event:Event):void<br />
        {<br />
                uploadedFiles.addItem(event.currentTarget.name);</p>
<p>                filesToUpload.removeItemAt(0);</p>
<p>                uploadFileRefList.fileList.splice(0, 1);</p>
<p>                if (filesToUpload.length == 0)<br />
                {<br />
                        pb.label = &#8220;LOADING 0%&#8221;;<br />
                        pb.setProgress(0, 0);<br />
                        event.currentTarget.removeEventListener(Event.COMPLETE,<br />
uploadCompleteHandler);<br />
                        event.currentTarget.removeEventListener(IOErrorEvent.IO_ERROR,<br />
uploadIoErrorHandler);<br />
                        event.currentTarget.removeEventListener(ProgressEvent.PROGRESS,<br />
uploadProgressHandler);<br />
                }<br />
                else<br />
                {<br />
                        doUpload(uploadFileRefList.fileList[0]);<br />
                }</p>
<p>        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derek Wischusen</title>
		<link>http://flexonrails.net/?p=12&#038;cpage=1#comment-14577</link>
		<dc:creator>Derek Wischusen</dc:creator>
		<pubDate>Thu, 26 Apr 2007 02:00:50 +0000</pubDate>
		<guid isPermaLink="false">http://flexonrails.net/?p=12#comment-14577</guid>
		<description>Hi Kay,

If you want to launch an app by pointing your browser to http://localhost:3000 you will need to put the swf file for your Flex app in the public folder of your Rails app, and you will need to replace the index.html file in there with with html file that Flex Builder generates for your app.

Derek</description>
		<content:encoded><![CDATA[<p>Hi Kay,</p>
<p>If you want to launch an app by pointing your browser to <a href="http://localhost:3000" rel="nofollow">http://localhost:3000</a> you will need to put the swf file for your Flex app in the public folder of your Rails app, and you will need to replace the index.html file in there with with html file that Flex Builder generates for your app.</p>
<p>Derek</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kay</title>
		<link>http://flexonrails.net/?p=12&#038;cpage=1#comment-14120</link>
		<dc:creator>Kay</dc:creator>
		<pubDate>Tue, 24 Apr 2007 13:15:32 +0000</pubDate>
		<guid isPermaLink="false">http://flexonrails.net/?p=12#comment-14120</guid>
		<description>Hi, 

I just started on flexonrails.. and to be honest, I know absolutely zilch. I started from your article over at 
&lt;a href=&quot;http://www.adobe.com/devnet/flex/articles/flex2_rails.html&quot; rel=&quot;nofollow&quot;&gt;
adobe&lt;/a&gt; but I couldnt understand why I cannot get it to work by pointing my browser to a localhost:3000  something.

Now I found out your SDK but I still cannot understand what was the difference that enabled the issue tracker to be displayed on the localhost:3000

Can you enlighten me?

I have Flex 2 builder btw.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>I just started on flexonrails.. and to be honest, I know absolutely zilch. I started from your article over at<br />
<a href="http://www.adobe.com/devnet/flex/articles/flex2_rails.html" rel="nofollow"><br />
adobe</a> but I couldnt understand why I cannot get it to work by pointing my browser to a localhost:3000  something.</p>
<p>Now I found out your SDK but I still cannot understand what was the difference that enabled the issue tracker to be displayed on the localhost:3000</p>
<p>Can you enlighten me?</p>
<p>I have Flex 2 builder btw.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Ruby on Rails RIA SDK by Adobe - danielyuen.hk Blog</title>
		<link>http://flexonrails.net/?p=12&#038;cpage=1#comment-3780</link>
		<dc:creator>The Ruby on Rails RIA SDK by Adobe - danielyuen.hk Blog</dc:creator>
		<pubDate>Fri, 09 Feb 2007 16:49:28 +0000</pubDate>
		<guid isPermaLink="false">http://flexonrails.net/?p=12#comment-3780</guid>
		<description>[...] flexonrails.net Â» Blog Archive Â» Adobe Flex RoR SDK [...]</description>
		<content:encoded><![CDATA[<p>[...] flexonrails.net Â» Blog Archive Â» Adobe Flex RoR SDK [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
