6 Replies Latest reply on Mar 4, 2010 10:53 PM by franto kormanak

    focusSkinExclusions

    franto kormanak

      focusSkinExclusions doesnt work for me in latest build (in Beta it worked). Is there any changed Im not aware of from Beta 2?

        • 1. Re: focusSkinExclusions
          Peter deHaan Level 4

          @franto,

           

          Can you post a simple example here and/or file a bug and we can take a look.

           

          Thanks,

          Peter

          • 2. Re: focusSkinExclusions
            franto kormanak Level 1

            problem was that I needed to remove focus skin from some custom component (which extends TextInput), I've added all subcomponetns into focusSkinExclusions, but focus skin was still there. But then I've found out focusThickness, and I've set it to 0, so it solved my problem.

             

             

            THis is skin which works in Beta2, but didnt work in latest build

             

            <?xml version="1.0" encoding="utf-8"?>
            <s:SparkSkin xmlns:s="library://ns.adobe.com/flex/spark" 
                      xmlns:fx="http://ns.adobe.com/mxml/2009" 
                      xmlns:d="http://ns.adobe.com/fxg/2008/dt"
                      hasFocusableChildren="false">
                 
                 <fx:Metadata>[HostComponent("com.flexets.view.components.PromptTextInput")]</fx:Metadata>
                 
                 <fx:Declarations>
                      <s:SolidColorStroke id="cursor" color="0xb9b9b9" weight="1"/>     
                 </fx:Declarations>
                 
                 <s:states>
                      <s:State name="normal"/>
                      <s:State name="rollover"/>
                      <s:State name="bordered"/>
                      
                      <s:State name="userText"/>
                      <s:State name="userTextRollover"/>
                      <s:State name="userTextBordered"/>
                      
                      <s:State name="disabled"/>
                 </s:states>
                 
                 <!-- STROKE -->
                 <!--s:BitmapImage id="stroke" source="@Embed('/assets/textInputOuterStroke.png')" x="0" y="0" excludeFrom="[normal, userText]"/-->
                 <s:Rect id="bkg" left="1" top="1" right="1" bottom="1" excludeFrom="[normal, userText]">
                      <s:fill>
                           <s:SolidColor color="0xffffff"/>
                      </s:fill>
                 </s:Rect>
                 <s:Rect id="stroke" left="0" right="0" top="0" bottom="0" includeIn="[rollover, userTextRollover]">
                      <s:stroke>
                           <s:SolidColorStroke color="0xe9e9e9" weight="1"/>
                      </s:stroke>
                 </s:Rect>
                 <s:Rect id="stroke2" left="0" right="0" top="0" bottom="0" includeIn="[bordered, userTextBordered]">
                      <s:stroke>
                           <s:SolidColorStroke color="0xd0d0d0" weight="1"/>
                      </s:stroke>
                 </s:Rect>
            
                 <!--s:Line left="5" top="2" height="27" stroke="{cursor}" includeIn="[normal, rollover]"/-->
                 <s:RichEditableText id="textDisplay" 
                                          lineBreak="toFit"
                                          color="{hostComponent.textColor}"
                                          fontFamily="{hostComponent.fontFamily}" 
                                          fontSize="{hostComponent.fontSize}"
                                          focusedTextSelectionColor="0xddf1f8"
                                          left="6" right="1" top="4" bottom="1"
                                          kerning="off" 
                                          heightInLines="{hostComponent.lines}"
                                          >
                 </s:RichEditableText>
                 
                 <fx:Script>
                      <![CDATA[
                           
                           override public function get focusSkinExclusions():Array { 
                                return [ textDisplay,stroke,stroke2, bkg ];
                           }
                      ]]>
                 </fx:Script>
            </s:SparkSkin>
            
            

             

             

            hope this helps

            • 3. Re: focusSkinExclusions
              Peter deHaan Level 4

              @Franto,

               

              What about if you change your code to this (seemed to work for me in 4.0.0.14288 SDK):

                  <fx:Script>
                      <![CDATA[
                          override public function get focusSkinExclusions():Array {
                              return ["textDisplay", "stroke", "stroke2", "bkg"];
                          }
                      ]]>
                  </fx:Script>

               

               

              Peter

              1 person found this helpful
              • 4. Re: focusSkinExclusions
                franto kormanak Level 1

                Thanks Peter it works

                 

                It seems it was change in some SDK after Beta2. Or at least support for instances (not instance names) was removed.

                • 5. Re: focusSkinExclusions
                  Peter deHaan Level 4

                  There have been oodles of changes since Beta2. I'd recommend moving to the latest nightly 4.0 builds as soon as possible if you havent already.

                   

                   

                  Peter

                  • 6. Re: focusSkinExclusions
                    franto kormanak Level 1

                    sure, I've change, not latest, but 14403 for now I cant update it daily, but it's much better now...