Skip navigation
Currently Being Moderated

Relative URL path for using Spellcheck

Dec 20, 2010 5:16 AM

Hi

 

In my application, i need to prefix a token to make relative path - an absolute path. And so the problem is that the dictionaries fail to load as the XMl file "AdobeSpellingConfig.xml" has path relative to the main application swf file.

 

The path will change per user and thus I can't even hard code it. Is there any way to accomplish this ? i.e i add a relative path and token and while loading it combines both to load the file?

 

Can I have access to source code? Is this open source?

 

All help is deeply appreciated.

 
Replies
  • Currently Being Moderated
    Dec 23, 2010 3:56 AM   in reply to Purnima Jain

    I have the same problem.

    The best should be to be able to set the content of the AdobeSpellingConfig.xml

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 7, 2011 3:59 AM   in reply to Purnima Jain

    Pujain

     

    Could you let us know which squiggly build are you using?

     

    For changing the spelling configuration URL Config XML file from default 'AdobeSpellingConfig.xml' you may set SpellUI spellingConfigURL property and use different XML file. This (spellingConfigURL) can be set using relative as well as absolute path.

     

    Also the 'AdobeSpellingConfig.xml' is made by you so you can always edit it and add both relative and absolute paths for Rule and Dictionary files.

     

    Please Let me know if this helps and please explain the problem furthur if it still exists.

     

    --

    Utsav

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 10, 2011 3:57 AM   in reply to Purnima Jain

    Hi

     

    What I get from your explanation is something like this

    1) Suppose You have 2 users (Myuser1 and Myuser2)

    2) You want to use 2 different (Say Myuser1.xml and Myuser2.xml) files for the users.

    3) Both files are located in C:/SpellCheckApplication/ directory.

     

    You can easily do this using spellingConfigURL property.

     

    Some code:

     

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" >       
    <mx:Script>
        <![CDATA[
                import com.adobe.linguistics.spelling.SpellUI;   
          
                private function enableFeature():void {
                    var str1:String="C:/SpellCheckApplication/";
                    result.text=str1+ta.text;
                    SpellUI.spellingConfigURL =str1+ta.text;
                    SpellUI.enableSpelling(textArea, "en_US");
                }
                private function disableFeature() :void {
                    SpellUI.disableSpelling(textArea);
                }
      
            //---------------------------
        ]]>
    </mx:Script>
           
        <mx:TextArea id="textArea" width="20%" height="20%" fontSize="30" text="Mary had a lillltttlleee lambbb. His fur is wheeti as snow. "/>
        <mx:TextArea id="ta"/>
        <mx:Text id="result" />
        <mx:Button id="tt1" label="disable Feature" click="disableFeature()" />
        <mx:Button id="tt2" label="enable Feature" click="enableFeature()" />
    </mx:Application>

     

    Now to use above you need to fill text Area 2 with either Myuser1.xml or Myuser2.xml and click enable spelling.

     

    Hope this helps!!

    --

    Utsav

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2011 10:39 PM   in reply to Purnima Jain

    Hi

    With the build you are using you wont be able to configure the rule and dictionary file but you would be able to this very soon with squiggly's next release.

     

    --

    Utsav

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2011 11:15 PM   in reply to utsav_adobe

    Hi Utsav,

     

    Even i am facing this issue. I would like to know if there is any way in which i can mention the dictionary URL relative to the position of AdobeSpellingConfig.xml. In my application there are modules which are loaded. So the URL on the browser and from which the SWF is loaded are different. By passing valid value for SpellUI.spellingConfigUrl i am able to load the AdobeSpellingConfig.xml. But loading of .dic files and .aff files are failing as they are being laoded from URL relative to browser url.

     

    Any inputs on this will be highly appreciated.

     

    Thanks,

    Saagar Shetty

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 13, 2011 2:42 AM   in reply to Saagar Shetty

    Hi

    I dont know the build you are using, but assuming that you also are using squiggly 0.4, you can always specify an absoulte path in 'AdobeSpellingConfig.xml'

    Maybe you may edit the .xml file to set URL for Dictionary and rule file  at run time. But you cannot specify the ruleFile and dictionaryFile still in 0.4 build. Wait for the next release and you shall be able to do so.

     

    Hope this answers!

     

    Thanx

    Utsav

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 18, 2011 3:04 AM   in reply to Purnima Jain

    We are hopeful of releasing it within a month.

     

    Thanx

    Utsav

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 22, 2011 3:28 AM   in reply to Purnima Jain

    Please use this alternate location for downloading the latest asdocs: http://labs.adobe.com/downloads/squiggly.html

     

    We will be correcting the main page link soon.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 23, 2011 1:59 PM   in reply to ravi_adobe_

     

    I apologize for the older content.  All links for the ASDocs on Labs should point to the latest version.

     

    - Bruce, Adobe

     

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2011 4:58 AM   in reply to Purnima Jain

    Hello,

    This question remains unanswerd. How do I specifiy the DYNAMIC location of the ruleFile and dictionaryFile?  When my application is running in production, depending on the server, loadballancer, etc the static location of the en_US.aff and en_US.dic DYNAMICALLY changes. Every time the app load the assets could be in a different location.  That location is passsed in a config var as a FlashVar.  I need to change the URL of the en_US.aff and en_US.dic locations at runtime.

     

    I did not see a way to do this in the documentation.  Has anyone gotten this to work?

     

    Thanks for any help you can offer.

     

    --jason

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points