0
votes

Whats wrong with this Flex MXML code? I'm getting error messages (error lines marked with "X"). Code is very simple but I cannot find the error.

Message both times: multiple initalisation values for standard property "text" of type "string" (translated from german)

 <?xml version="1.0" encoding="utf-8"?>
    <s:TextInput xmlns:fx="http://ns.adobe.com/mxml/2009"
                 xmlns:s="library://ns.adobe.com/flex/spark"
                 focusIn="keyboardIsOpen=true" 
X                focusOut="keyboardIsOpen=false">
        <fx:Script>
            <![CDATA[
                //var
                static public var keyboardIsOpen:Boolean = false;
            ]]>
X       </fx:Script>
    </s:TextInput>
2

2 Answers

0
votes

This is an issue with the Flex SDK. Bug - 25184 The workaround according to the comments in the bug report is to explicitly set the text property like this.

<?xml version="1.0" encoding="utf-8"?>
<s:TextInput xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         focusIn="keyboardIsOpen=true" 
         focusOut="keyboardIsOpen=false"
         text="">
    <fx:Script>
        <![CDATA[
            //var
            static public var keyboardIsOpen:Boolean = false;
        ]]>
    </fx:Script>
</s:TextInput>
0
votes

I ve just solve your problem. I found error initially then error showing is "Multiple markers at this line: -focusOut -Multiple initializer values for default property, 'text', of type 'String'"

I ve just change code, a property added b/w these

<?xml version="1.0" encoding="utf-8"?>                                      
<s:TextInput xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"    
focusIn="keyboardIsOpen=true" 
focusOut="keyboardIsOpen=false">
<s:fontSize>
    14
</s:fontSize>
<fx:Script>
    <![CDATA[
        static public var keyboardIsOpen:Boolean = false;
    ]]>
  </fx:Script>