You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2016/03/30 07:13:48 UTC
[18/38] git commit: [flex-utilities] [refs/heads/master] - clean up
example
clean up example
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/4de22cf6
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/4de22cf6
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/4de22cf6
Branch: refs/heads/master
Commit: 4de22cf6689b0ee6f07d87e438763daca16af8a3
Parents: fd1f89b
Author: Justin Mclean <jm...@apache.org>
Authored: Fri Oct 31 16:12:32 2014 +1100
Committer: Justin Mclean <jm...@apache.org>
Committed: Fri Oct 31 16:12:32 2014 +1100
----------------------------------------------------------------------
.../src/apache/squiggly/SpellingExExample.mxml | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4de22cf6/TourDeFlex/TourDeFlex3/src/apache/squiggly/SpellingExExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/apache/squiggly/SpellingExExample.mxml b/TourDeFlex/TourDeFlex3/src/apache/squiggly/SpellingExExample.mxml
index d6aea3a..547b45c 100644
--- a/TourDeFlex/TourDeFlex3/src/apache/squiggly/SpellingExExample.mxml
+++ b/TourDeFlex/TourDeFlex3/src/apache/squiggly/SpellingExExample.mxml
@@ -17,11 +17,16 @@
limitations under the License.
-->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark">
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
- import com.adobe.linguistics.spelling.SpellUI;
+ import com.adobe.linguistics.spelling.SpellUI;
+
+ private function enableSpelling():void {
+ SpellUI.enableSpelling(textArea, "en_US");
+ }
]]>
</fx:Script>
@@ -30,10 +35,10 @@
<s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
</s:layout>
<s:Group width="100%" height="100%">
- <s:TextArea id="ta_en" width="50%" height="50%"
- text="I know Enlish. Use the context menu to see the suggestions of the missbelled word."
- creationComplete="SpellUI.enableSpelling(ta_en, 'en_US')"/>
+ <s:TextArea id="textArea" width="50%" height="50%"
+ text="I know Enlish. Use the context menu to see the suggestions of the missbelled word." />
</s:Group>
+ <s:Button label="Check Spelling" click="enableSpelling()" />
</s:Panel>
</s:Application>