Fixing the error "Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://127.0.0.1/myapplication/data/en_US.aff" for a Web-based Flex application

273 views
Skip to first unread message

Minal

unread,
Dec 3, 2013, 7:33:31 PM12/3/13
to Flex India Community

I tried the below example code and it works fine

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" viewSourceURL="srcview/index.html" applicationComplete="init()">
<mx:Script>
<![CDATA[
import com.adobe.linguistics.spelling.SpellUI;
import com.adobe.linguistics.spelling.framework.SpellingConfiguration;
import com.adobe.linguistics.spelling.framework.ResourceTable;


public function init():void
{
var resourceTable:ResourceTable = new ResourceTable();
resourceTable.setResource("en_US", {rule:"data/en_US.aff", dict:"data/en_US.dic"});
SpellingConfiguration.resourceTable = resourceTable;
}
]]>
</mx:Script>

<mx:Label text="Squiggly Spell Checker Flex Demo v0.6" fontSize="30"/>

<mx:TabNavigator width="60%" height="100%" fontSize="20">
<mx:Canvas label="English" width="100%" height="100%">
<mx:TextArea id="ta_en" width="100%" height="100%"
text="I know Enlish. Use the context menu to see the suggestions of the missbelled word."
creationComplete="SpellUI.enableSpelling(ta_en, 'en_US');"/>
</mx:Canvas>


</mx:TabNavigator>
</mx:Application>

I got the Squggly package http://labs.adobe.com/technologies/squiggly/ and placed the dictionary files in proper location, ensured the build path has the proper SWC files(AdobeLinguisticUtils.swc, AdobeSpellingEngine.swc, AdobeSpellingFramework.swc,
AdobeSpellingUI.swc, AdobeSpellingUIEx.swc, AdobeSpellingUITLF.swc) in the project(myapplication directory) libs folder and in the bin-debug/libs folder also.

I also ensured that the dictionary files en_US.dic and en_US.aff are in the bin-debug/dictionaries

I tried adding an error handler(as suggested at http://stackoverflow.com/questions/3260608/flash-error-error-2044-unhandled-ioerror-text-error-2032-stream-error-ur)
before the window is opened to catch the Unhandled ioError:. text=Error #2032:, but the error is not caught by the error handler


The application is built using Flex 4.5.1 SDK as the front end, Coldfusion 9 as middle tier, MySQL 5.5 as back end and uses IIS 7 as the web server.

What could be causing it? Since the example code works properly, I estimate when my Web application tries to use the dictionaries there is an issue.


Any suggestions would be appreciated

Santosh Bhoyar

unread,
Jun 5, 2014, 4:22:26 AM6/5/14
to flex_...@googlegroups.com
Ensure that dictionary files are accessible and configure AdobeSpellingConfig.xml file accordigly.

Important- Change extensions / make it  en_US_aff.xml and en_US_dic.xml

Hope it will  fix issue.

Sample Code for TextArea-

<?xml version="1.0" encoding="utf-8"?>
<s:TextArea xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" implements="mx.managers.IFocusManagerComponent"
            xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="TxtArea_CreationCompleteHandler(event)">
    <fx:Script>
        <![CDATA[
            import com.adobe.linguistics.spelling.SpellUI;
            import com.rrd.mc.model.ModelCommon;
            import com.rrd.mc.utils.UtilCommon;
           
            import mx.events.FlexEvent;
           
             protected function TxtArea_CreationCompleteHandler(event:FlexEvent):void
            {
                // TODO Auto-generated method stub
                this.setFocus();   
                 SpellUI.spellingConfigUrl = ModelCommon.getInstance().rootContext+ "/flash/" + "data/AdobeSpellingConfig.xml";
                SpellUI.enableSpelling(this, "en_US");
            }
           
        ]]>
    </fx:Script>
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
</s:TextArea>


Thanks,
Santosh Bhoyar
Hyderabad.





--
You received this message because you are subscribed to the Google Groups "Flex India Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flex_india+...@googlegroups.com.
To post to this group, send email to flex_...@googlegroups.com.
Visit this group at http://groups.google.com/group/flex_india.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages