You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Shervin Asgari <sh...@webstep.no> on 2013/09/26 14:14:21 UTC

Validate two fields in a validator

Hi.

I have a date validator on each field which validates if they are a correct
date.
However, in one of the two date fields, I need to validate if it is after
the other date.

So this means I have to somehow get the other inputfield date in my
validator.
I have tried to do this using a listener on the other field, but it
retrieves null.

Any ideas how I can do this?

Shervin

RE: Validate two fields in a validator

Posted by Miguel Ferreira <mi...@hotmail.com>.
no problem.
To achieve what you need you also have another solution with the validator. (you can also check always the validation, even if is prevent when the user makes some action there is some times that the dates are setted programmaticly so the validation will prevent that some crazy data will go forward)
I will just pass the idea.
you extend the datevalidator class
override the method doValidation
override protected function doValidation(value:Object):Array {						results = [];			results = super.doValidation(value);			
						var StartTimestamp : Number = StartDate.getTime (); // create milisec from start date			var EndTimestamp : Number = StartEnd.getTime ();    // create milisec from end date        
/****  CHECK THE DATEs and return the results*/}
I hope will be enough for you to go to the next step.

Miguel

> Date: Thu, 26 Sep 2013 14:37:44 +0200
> Subject: Re: Validate two fields in a validator
> From: shervin.asgari@webstep.no
> To: users@flex.apache.org
> 
> Thanks! That will help.
> I will look at it
> 
> 
> 2013/9/26 Miguel Ferreira <mi...@hotmail.com>
> 
> > sorry about the short reply.
> > but we can see here:
> > http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/DateChooser.html#selectableRange
> > That will help your user to no select some dates
> > on the rangeStart : just put the selected date from the your component
> > then you can add one day or something that adjust your BL.
> > I hope that helps.Miguel
> >
> > > From: miguel.cd.ferreira@hotmail.com
> > > To: users@flex.apache.org
> > > Subject: RE: Validate two fields in a validator
> > > Date: Thu, 26 Sep 2013 13:16:54 +0100
> > >
> > > you can also give a selectedRange then that error is prevented.
> > >
> > > > Date: Thu, 26 Sep 2013 14:14:21 +0200
> > > > Subject: Validate two fields in a validator
> > > > From: shervin.asgari@webstep.no
> > > > To: users@flex.apache.org
> > > >
> > > > Hi.
> > > >
> > > > I have a date validator on each field which validates if they are a
> > correct
> > > > date.
> > > > However, in one of the two date fields, I need to validate if it is
> > after
> > > > the other date.
> > > >
> > > > So this means I have to somehow get the other inputfield date in my
> > > > validator.
> > > > I have tried to do this using a listener on the other field, but it
> > > > retrieves null.
> > > >
> > > > Any ideas how I can do this?
> > > >
> > > > Shervin
> > >
> >
> >
 		 	   		  

Re: Validate two fields in a validator

Posted by Shervin Asgari <sh...@webstep.no>.
Thanks! That will help.
I will look at it


2013/9/26 Miguel Ferreira <mi...@hotmail.com>

> sorry about the short reply.
> but we can see here:
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/DateChooser.html#selectableRange
> That will help your user to no select some dates
> on the rangeStart : just put the selected date from the your component
> then you can add one day or something that adjust your BL.
> I hope that helps.Miguel
>
> > From: miguel.cd.ferreira@hotmail.com
> > To: users@flex.apache.org
> > Subject: RE: Validate two fields in a validator
> > Date: Thu, 26 Sep 2013 13:16:54 +0100
> >
> > you can also give a selectedRange then that error is prevented.
> >
> > > Date: Thu, 26 Sep 2013 14:14:21 +0200
> > > Subject: Validate two fields in a validator
> > > From: shervin.asgari@webstep.no
> > > To: users@flex.apache.org
> > >
> > > Hi.
> > >
> > > I have a date validator on each field which validates if they are a
> correct
> > > date.
> > > However, in one of the two date fields, I need to validate if it is
> after
> > > the other date.
> > >
> > > So this means I have to somehow get the other inputfield date in my
> > > validator.
> > > I have tried to do this using a listener on the other field, but it
> > > retrieves null.
> > >
> > > Any ideas how I can do this?
> > >
> > > Shervin
> >
>
>

RE: Validate two fields in a validator

Posted by Miguel Ferreira <mi...@hotmail.com>.
sorry about the short reply.
but we can see here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/DateChooser.html#selectableRange
That will help your user to no select some dates
on the rangeStart : just put the selected date from the your component then you can add one day or something that adjust your BL.
I hope that helps.Miguel

> From: miguel.cd.ferreira@hotmail.com
> To: users@flex.apache.org
> Subject: RE: Validate two fields in a validator
> Date: Thu, 26 Sep 2013 13:16:54 +0100
> 
> you can also give a selectedRange then that error is prevented.
> 
> > Date: Thu, 26 Sep 2013 14:14:21 +0200
> > Subject: Validate two fields in a validator
> > From: shervin.asgari@webstep.no
> > To: users@flex.apache.org
> > 
> > Hi.
> > 
> > I have a date validator on each field which validates if they are a correct
> > date.
> > However, in one of the two date fields, I need to validate if it is after
> > the other date.
> > 
> > So this means I have to somehow get the other inputfield date in my
> > validator.
> > I have tried to do this using a listener on the other field, but it
> > retrieves null.
> > 
> > Any ideas how I can do this?
> > 
> > Shervin
>  		 	   		  
 		 	   		  

RE: Validate two fields in a validator

Posted by Miguel Ferreira <mi...@hotmail.com>.
you can also give a selectedRange then that error is prevented.

> Date: Thu, 26 Sep 2013 14:14:21 +0200
> Subject: Validate two fields in a validator
> From: shervin.asgari@webstep.no
> To: users@flex.apache.org
> 
> Hi.
> 
> I have a date validator on each field which validates if they are a correct
> date.
> However, in one of the two date fields, I need to validate if it is after
> the other date.
> 
> So this means I have to somehow get the other inputfield date in my
> validator.
> I have tried to do this using a listener on the other field, but it
> retrieves null.
> 
> Any ideas how I can do this?
> 
> Shervin
 		 	   		  

RE: spark.skins.SparkButtonSkin -> Undefined state 'up'

Posted by Maurice Amsellem <ma...@systar.com>.
You are correct.  

iconDisplay is not in the skin itself, but in its parentClass (SparkButtonSkin).
Sorry for the confusion.

So all is well that ends well :-)

Maurice 

-----Message d'origine-----
De : Frank Dahmen [mailto:frank@dahmenia.de] 
Envoyé : mercredi 2 octobre 2013 15:01
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

Flex 4.9.1 does include icondisplay
ok, my sdk version does not meet the docs version, so the docs are not wrong

thanks


----- Original Message ----- 
From: "Maurice Amsellem" <ma...@systar.com>
To: <us...@flex.apache.org>
Sent: Wednesday, October 02, 2013 2:48 PM
Subject: RE: spark.skins.SparkButtonSkin -> Undefined state 'up'


You are right, spark Button (actual ButtonBase) has an icon.
however, it's not a property, it's a style, so that you can set it in css or 
in MXML.

In MXML it wouldn't make a difference that it's a property or a style.

Note that the default spark.skins.spark.ButtonSkin (in Flex 4.10) does not 
"implement" the skinPart "iconDisplay", so you will have to add it in your 
custom skin.
That's very easy,
Just add:
<BitmapImage id="iconDisplay" />
In the right place in your custom skin.

Regards,

Maurice

-----Message d'origine-----
De : Frank Dahmen [mailto:frank@dahmenia.de]
Envoyé : mercredi 2 octobre 2013 14:35
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

no, i don't have it anymore

but i now i see that spark button has an icon property and 
spark.skins.spark.ButtonSkin (the default) does include it....out of the box

so i think the docs are wrong:

spark.components.Button:

"... The default skin has a text label. Define a custom skin class to add an 
image to the control. ..."



----- Original Message ----- 
From: "Maurice Amsellem" <ma...@systar.com>
To: <us...@flex.apache.org>
Sent: Wednesday, October 02, 2013 2:00 PM
Subject: RE: spark.skins.SparkButtonSkin -> Undefined state 'up'


Do you have the link where you see that ?

Maurice

-----Message d'origine-----
De : Frank Dahmen [mailto:frank@dahmenia.de]
Envoyé : mercredi 2 octobre 2013 13:12
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

ah, thanks

although i saw an example in the www which used it just as i did

thanks



----- Original Message ----- 
From: "Maurice Amsellem" <ma...@systar.com>
To: <us...@flex.apache.org>
Sent: Wednesday, October 02, 2013 11:05 AM
Subject: RE: spark.skins.SparkButtonSkin -> Undefined state 'up'


The required states for a skin are listed in the "skinStates" section of the
host component (in this case spark.components.Button):

(Apache)
http://flex.apache.org/asdoc/ => spark.components.Button => Skin States

(Adobe)
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Button.html#SkinStateSummary


Maurice


-----Message d'origine-----
De : Scott Matheson [mailto:smatheson@intralinks.com]
Envoyé : mercredi 2 octobre 2013 10:48
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

Frank
    I am not sure if this is your issue, with Skins you have to define all
the states the skin will need, even if you do not need these states in your
application, I have not found any documentation that define what states you
need for any skin


A button needs


<s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
</s:states>



I always start with the default item, button, button bar etc, then in visual
designer (4.6) click generate skin, then delete all the code that defines
the  button, then add my own code

This is a small example of a ICON in a button

In this example, it is the same icone with colors for each state

<s:SolidColor color.disabled="#F2F2F2" color.down="#FFD241"
color.over="#FFD241" color.up="#DCDCDC"/>



Scott

<?xml version="1.0" encoding="utf-8"?>

<!--

    ADOBE SYSTEMS INCORPORATED
    Copyright 2008 Adobe Systems Incorporated
    All Rights Reserved.

    NOTICE: Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the license agreement accompanying it.

-->

<!--- The default skin class for the Spark Button component.

       @see spark.components.Button

      @langversion 3.0
      @playerversion Flash 10
      @playerversion AIR 1.5
      @productversion Flex 4
-->
<s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                   width="21" height="22"
                   alpha.disabled="0.5"
                   >

<fx:Metadata>[HostComponent("com.peach.uofs.components.basic_navigation_pag
es.pips.JumpToGoToPage")]</fx:Metadata>



    <!-- states -->
    <s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
    </s:states>
    <s:layout>
        <s:ConstraintLayout/>
    </s:layout>


<s:Rect width="100%" height="100%" id="box" >
    <s:fill >
        <s:SolidColor alpha="0" />
    </s:fill>
</s:Rect>

    <s:Group  >
        <s:Group  >
            <s:Path left="4"
                    data="M16.9038 6.31691C16.9136 6.2925 16.9214 6.26711
16.9292 6.24171 16.9429 6.20851 16.9526 6.17531 16.9604 6.14211 16.9683
6.11769 16.9761 6.09132 16.9819 6.06691 16.9897 6.03078 16.9995 5.99562
17.0073 5.95851 17.0093 5.93605 17.0132 5.91164 17.019      5.88625
17.0249 5.84914 17.0269 5.81203 17.0308 5.77296 17.0308 5.7505 17.0327
5.72609 17.0347 5.70265 17.0366 5.66554 17.0366 5.6255 17.0366 5.58449
17.0366 5.57277 17.0366 5.56105 17.0366 5.54933 17.0366 5.53664 17.0327
5.52687 17.0327 5.5132      17.0308 5.47609 17.0269 5.44093 17.0249
5.40187 17.021 5.37648 17.0151 5.34914 17.0132 5.31984 17.0093 5.29054
17.0015 5.26027 16.9956 5.23 16.9878 5.19875 16.9819 5.1675 16.9741
5.13625 16.9663 5.11183 16.9565 5.08546 16.9507 5.06007 16.9429
5.02687 16.9312 4.99367 16.9155 4.96144 16.9077 4.93703 16.8999 4.91359
16.8901 4.89211 16.8765 4.85793 16.8608 4.8257 16.8452 4.7964 16.8335
4.77003 16.8198 4.74757 16.8062 4.72218 16.7925 4.69484 16.7788 4.66652
16.7612 4.64015 16.7437 4.61281      16.7261 4.58644 16.7104 4.56007
16.6929 4.53761 16.6772 4.51711 16.6616 4.49367 16.6401 4.46535 16.6167
4.43898 16.5952 4.41066 16.5796 4.39308 16.564 4.37453 16.5444 4.35597
16.5229 4.33058 16.4976 4.30519 16.4722 4.27882 16.4546 4.26125 16.4351
  4.24464 16.4155 4.22511 16.3921 4.20461 16.3667 4.18312 16.3394 4.16261
16.3159 4.14406 16.2925 4.12453 16.269 4.10695 16.2476 4.09035 16.2202
4.0757 16.1987 4.05714 16.1714 4.03957 16.1382 4.01906 16.1089 4.00148
16.0991 3.99562 16.0874 3.98781      16.0776 3.98097L9.37451
0.237808C8.46631 -0.266098 7.32568 0.0561676 6.81982 0.962418 6.31592
1.86476 6.63818 3.00929 7.54248 3.51515L9.91357 4.83644C3.90381 7.22023
-0.244629 13.1987 0.0112305 20.0112 0.050293 21.0484 0.92334 21.854 1.9585
21.8159      1.99756 21.815 2.03467 21.812 2.07373 21.8081 3.0542 21.7114
3.79834 20.8657 3.76318 19.8706 3.56006 14.5855 6.84912 9.96437 11.5581
8.22414L9.78076 11.4077C9.27295 12.314 9.59912 13.4566 10.5054 13.9614
10.8511 14.1548 11.2339 14.228 11.6011      14.1909 12.1929 14.1323
12.7456 13.7964 13.0562 13.2359L16.8003 6.53468C16.8081 6.51906 16.8159
6.50246 16.8237 6.48488 16.8354 6.46242 16.8472 6.43703 16.8608 6.41359
16.8745 6.38039 16.8882 6.34914 16.9038 6.31691Z"
                    verticalCenter="0" winding="nonZero">
                <s:fill>
                    <s:SolidColor color.disabled="#F2F2F2"
color.down="#FFD241"   color.over="#FFD241" color.up="#DCDCDC"/>
                </s:fill>
            </s:Path>
        </s:Group>
    </s:Group>



</s:SparkButtonSkin>




On 10/2/13 8:18 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:

>Hi,
>
>i'm using
>
><s:Button label="button" skinClass="spark.skins.SparkButtonSkin"/>
>
>got the error: Undefined state 'up'.
>
>
>do i have to to subclass SparkButtonSkin?
>
>(i want to put an icon on the Button)
>
>
>thanks


________________________________

Disclaimer: This electronic mail and any attachments are confidential and
may be privileged. If you are not the intended recipient, please notify the
sender immediately by replying to this email, and destroy all copies of this
email and any attachments. Thank you. 


Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

Posted by Frank Dahmen <fr...@dahmenia.de>.
Flex 4.9.1 does include icondisplay
ok, my sdk version does not meet the docs version, so the docs are not wrong

thanks


----- Original Message ----- 
From: "Maurice Amsellem" <ma...@systar.com>
To: <us...@flex.apache.org>
Sent: Wednesday, October 02, 2013 2:48 PM
Subject: RE: spark.skins.SparkButtonSkin -> Undefined state 'up'


You are right, spark Button (actual ButtonBase) has an icon.
however, it's not a property, it's a style, so that you can set it in css or 
in MXML.

In MXML it wouldn't make a difference that it's a property or a style.

Note that the default spark.skins.spark.ButtonSkin (in Flex 4.10) does not 
"implement" the skinPart "iconDisplay", so you will have to add it in your 
custom skin.
That's very easy,
Just add:
<BitmapImage id="iconDisplay" />
In the right place in your custom skin.

Regards,

Maurice

-----Message d'origine-----
De : Frank Dahmen [mailto:frank@dahmenia.de]
Envoyé : mercredi 2 octobre 2013 14:35
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

no, i don't have it anymore

but i now i see that spark button has an icon property and 
spark.skins.spark.ButtonSkin (the default) does include it....out of the box

so i think the docs are wrong:

spark.components.Button:

"... The default skin has a text label. Define a custom skin class to add an 
image to the control. ..."



----- Original Message ----- 
From: "Maurice Amsellem" <ma...@systar.com>
To: <us...@flex.apache.org>
Sent: Wednesday, October 02, 2013 2:00 PM
Subject: RE: spark.skins.SparkButtonSkin -> Undefined state 'up'


Do you have the link where you see that ?

Maurice

-----Message d'origine-----
De : Frank Dahmen [mailto:frank@dahmenia.de]
Envoyé : mercredi 2 octobre 2013 13:12
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

ah, thanks

although i saw an example in the www which used it just as i did

thanks



----- Original Message ----- 
From: "Maurice Amsellem" <ma...@systar.com>
To: <us...@flex.apache.org>
Sent: Wednesday, October 02, 2013 11:05 AM
Subject: RE: spark.skins.SparkButtonSkin -> Undefined state 'up'


The required states for a skin are listed in the "skinStates" section of the
host component (in this case spark.components.Button):

(Apache)
http://flex.apache.org/asdoc/ => spark.components.Button => Skin States

(Adobe)
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Button.html#SkinStateSummary


Maurice


-----Message d'origine-----
De : Scott Matheson [mailto:smatheson@intralinks.com]
Envoyé : mercredi 2 octobre 2013 10:48
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

Frank
    I am not sure if this is your issue, with Skins you have to define all
the states the skin will need, even if you do not need these states in your
application, I have not found any documentation that define what states you
need for any skin


A button needs


<s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
</s:states>



I always start with the default item, button, button bar etc, then in visual
designer (4.6) click generate skin, then delete all the code that defines
the  button, then add my own code

This is a small example of a ICON in a button

In this example, it is the same icone with colors for each state

<s:SolidColor color.disabled="#F2F2F2" color.down="#FFD241"
color.over="#FFD241" color.up="#DCDCDC"/>



Scott

<?xml version="1.0" encoding="utf-8"?>

<!--

    ADOBE SYSTEMS INCORPORATED
    Copyright 2008 Adobe Systems Incorporated
    All Rights Reserved.

    NOTICE: Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the license agreement accompanying it.

-->

<!--- The default skin class for the Spark Button component.

       @see spark.components.Button

      @langversion 3.0
      @playerversion Flash 10
      @playerversion AIR 1.5
      @productversion Flex 4
-->
<s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                   width="21" height="22"
                   alpha.disabled="0.5"
                   >

<fx:Metadata>[HostComponent("com.peach.uofs.components.basic_navigation_pag
es.pips.JumpToGoToPage")]</fx:Metadata>



    <!-- states -->
    <s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
    </s:states>
    <s:layout>
        <s:ConstraintLayout/>
    </s:layout>


<s:Rect width="100%" height="100%" id="box" >
    <s:fill >
        <s:SolidColor alpha="0" />
    </s:fill>
</s:Rect>

    <s:Group  >
        <s:Group  >
            <s:Path left="4"
                    data="M16.9038 6.31691C16.9136 6.2925 16.9214 6.26711
16.9292 6.24171 16.9429 6.20851 16.9526 6.17531 16.9604 6.14211 16.9683
6.11769 16.9761 6.09132 16.9819 6.06691 16.9897 6.03078 16.9995 5.99562
17.0073 5.95851 17.0093 5.93605 17.0132 5.91164 17.019      5.88625
17.0249 5.84914 17.0269 5.81203 17.0308 5.77296 17.0308 5.7505 17.0327
5.72609 17.0347 5.70265 17.0366 5.66554 17.0366 5.6255 17.0366 5.58449
17.0366 5.57277 17.0366 5.56105 17.0366 5.54933 17.0366 5.53664 17.0327
5.52687 17.0327 5.5132      17.0308 5.47609 17.0269 5.44093 17.0249
5.40187 17.021 5.37648 17.0151 5.34914 17.0132 5.31984 17.0093 5.29054
17.0015 5.26027 16.9956 5.23 16.9878 5.19875 16.9819 5.1675 16.9741
5.13625 16.9663 5.11183 16.9565 5.08546 16.9507 5.06007 16.9429
5.02687 16.9312 4.99367 16.9155 4.96144 16.9077 4.93703 16.8999 4.91359
16.8901 4.89211 16.8765 4.85793 16.8608 4.8257 16.8452 4.7964 16.8335
4.77003 16.8198 4.74757 16.8062 4.72218 16.7925 4.69484 16.7788 4.66652
16.7612 4.64015 16.7437 4.61281      16.7261 4.58644 16.7104 4.56007
16.6929 4.53761 16.6772 4.51711 16.6616 4.49367 16.6401 4.46535 16.6167
4.43898 16.5952 4.41066 16.5796 4.39308 16.564 4.37453 16.5444 4.35597
16.5229 4.33058 16.4976 4.30519 16.4722 4.27882 16.4546 4.26125 16.4351
  4.24464 16.4155 4.22511 16.3921 4.20461 16.3667 4.18312 16.3394 4.16261
16.3159 4.14406 16.2925 4.12453 16.269 4.10695 16.2476 4.09035 16.2202
4.0757 16.1987 4.05714 16.1714 4.03957 16.1382 4.01906 16.1089 4.00148
16.0991 3.99562 16.0874 3.98781      16.0776 3.98097L9.37451
0.237808C8.46631 -0.266098 7.32568 0.0561676 6.81982 0.962418 6.31592
1.86476 6.63818 3.00929 7.54248 3.51515L9.91357 4.83644C3.90381 7.22023
-0.244629 13.1987 0.0112305 20.0112 0.050293 21.0484 0.92334 21.854 1.9585
21.8159      1.99756 21.815 2.03467 21.812 2.07373 21.8081 3.0542 21.7114
3.79834 20.8657 3.76318 19.8706 3.56006 14.5855 6.84912 9.96437 11.5581
8.22414L9.78076 11.4077C9.27295 12.314 9.59912 13.4566 10.5054 13.9614
10.8511 14.1548 11.2339 14.228 11.6011      14.1909 12.1929 14.1323
12.7456 13.7964 13.0562 13.2359L16.8003 6.53468C16.8081 6.51906 16.8159
6.50246 16.8237 6.48488 16.8354 6.46242 16.8472 6.43703 16.8608 6.41359
16.8745 6.38039 16.8882 6.34914 16.9038 6.31691Z"
                    verticalCenter="0" winding="nonZero">
                <s:fill>
                    <s:SolidColor color.disabled="#F2F2F2"
color.down="#FFD241"   color.over="#FFD241" color.up="#DCDCDC"/>
                </s:fill>
            </s:Path>
        </s:Group>
    </s:Group>



</s:SparkButtonSkin>




On 10/2/13 8:18 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:

>Hi,
>
>i'm using
>
><s:Button label="button" skinClass="spark.skins.SparkButtonSkin"/>
>
>got the error: Undefined state 'up'.
>
>
>do i have to to subclass SparkButtonSkin?
>
>(i want to put an icon on the Button)
>
>
>thanks


________________________________

Disclaimer: This electronic mail and any attachments are confidential and
may be privileged. If you are not the intended recipient, please notify the
sender immediately by replying to this email, and destroy all copies of this
email and any attachments. Thank you. 


RE: spark.skins.SparkButtonSkin -> Undefined state 'up'

Posted by Maurice Amsellem <ma...@systar.com>.
You are right, spark Button (actual ButtonBase) has an icon.
however, it's not a property, it's a style, so that you can set it in css or in MXML.

In MXML it wouldn't make a difference that it's a property or a style.

Note that the default spark.skins.spark.ButtonSkin (in Flex 4.10) does not "implement" the skinPart "iconDisplay", so you will have to add it in your custom skin.
That's very easy,
Just add: 
<BitmapImage id="iconDisplay" /> 
In the right place in your custom skin.

Regards,

Maurice 

-----Message d'origine-----
De : Frank Dahmen [mailto:frank@dahmenia.de] 
Envoyé : mercredi 2 octobre 2013 14:35
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

no, i don't have it anymore

but i now i see that spark button has an icon property and spark.skins.spark.ButtonSkin (the default) does include it....out of the box

so i think the docs are wrong:

spark.components.Button:

"... The default skin has a text label. Define a custom skin class to add an image to the control. ..."



----- Original Message ----- 
From: "Maurice Amsellem" <ma...@systar.com>
To: <us...@flex.apache.org>
Sent: Wednesday, October 02, 2013 2:00 PM
Subject: RE: spark.skins.SparkButtonSkin -> Undefined state 'up'


Do you have the link where you see that ?

Maurice

-----Message d'origine-----
De : Frank Dahmen [mailto:frank@dahmenia.de]
Envoyé : mercredi 2 octobre 2013 13:12
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

ah, thanks

although i saw an example in the www which used it just as i did

thanks



----- Original Message ----- 
From: "Maurice Amsellem" <ma...@systar.com>
To: <us...@flex.apache.org>
Sent: Wednesday, October 02, 2013 11:05 AM
Subject: RE: spark.skins.SparkButtonSkin -> Undefined state 'up'


The required states for a skin are listed in the "skinStates" section of the
host component (in this case spark.components.Button):

(Apache)
http://flex.apache.org/asdoc/ => spark.components.Button => Skin States

(Adobe)
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Button.html#SkinStateSummary


Maurice


-----Message d'origine-----
De : Scott Matheson [mailto:smatheson@intralinks.com]
Envoyé : mercredi 2 octobre 2013 10:48
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

Frank
    I am not sure if this is your issue, with Skins you have to define all
the states the skin will need, even if you do not need these states in your
application, I have not found any documentation that define what states you
need for any skin


A button needs


<s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
</s:states>



I always start with the default item, button, button bar etc, then in visual
designer (4.6) click generate skin, then delete all the code that defines
the  button, then add my own code

This is a small example of a ICON in a button

In this example, it is the same icone with colors for each state

<s:SolidColor color.disabled="#F2F2F2" color.down="#FFD241"
color.over="#FFD241" color.up="#DCDCDC"/>



Scott

<?xml version="1.0" encoding="utf-8"?>

<!--

    ADOBE SYSTEMS INCORPORATED
    Copyright 2008 Adobe Systems Incorporated
    All Rights Reserved.

    NOTICE: Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the license agreement accompanying it.

-->

<!--- The default skin class for the Spark Button component.

       @see spark.components.Button

      @langversion 3.0
      @playerversion Flash 10
      @playerversion AIR 1.5
      @productversion Flex 4
-->
<s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                   width="21" height="22"
                   alpha.disabled="0.5"
                   >

<fx:Metadata>[HostComponent("com.peach.uofs.components.basic_navigation_pag
es.pips.JumpToGoToPage")]</fx:Metadata>



    <!-- states -->
    <s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
    </s:states>
    <s:layout>
        <s:ConstraintLayout/>
    </s:layout>


<s:Rect width="100%" height="100%" id="box" >
    <s:fill >
        <s:SolidColor alpha="0" />
    </s:fill>
</s:Rect>

    <s:Group  >
        <s:Group  >
            <s:Path left="4"
                    data="M16.9038 6.31691C16.9136 6.2925 16.9214 6.26711
16.9292 6.24171 16.9429 6.20851 16.9526 6.17531 16.9604 6.14211 16.9683
6.11769 16.9761 6.09132 16.9819 6.06691 16.9897 6.03078 16.9995 5.99562
17.0073 5.95851 17.0093 5.93605 17.0132 5.91164 17.019      5.88625
17.0249 5.84914 17.0269 5.81203 17.0308 5.77296 17.0308 5.7505 17.0327
5.72609 17.0347 5.70265 17.0366 5.66554 17.0366 5.6255 17.0366 5.58449
17.0366 5.57277 17.0366 5.56105 17.0366 5.54933 17.0366 5.53664 17.0327
5.52687 17.0327 5.5132      17.0308 5.47609 17.0269 5.44093 17.0249
5.40187 17.021 5.37648 17.0151 5.34914 17.0132 5.31984 17.0093 5.29054
17.0015 5.26027 16.9956 5.23 16.9878 5.19875 16.9819 5.1675 16.9741
5.13625 16.9663 5.11183 16.9565 5.08546 16.9507 5.06007 16.9429
5.02687 16.9312 4.99367 16.9155 4.96144 16.9077 4.93703 16.8999 4.91359
16.8901 4.89211 16.8765 4.85793 16.8608 4.8257 16.8452 4.7964 16.8335
4.77003 16.8198 4.74757 16.8062 4.72218 16.7925 4.69484 16.7788 4.66652
16.7612 4.64015 16.7437 4.61281      16.7261 4.58644 16.7104 4.56007
16.6929 4.53761 16.6772 4.51711 16.6616 4.49367 16.6401 4.46535 16.6167
4.43898 16.5952 4.41066 16.5796 4.39308 16.564 4.37453 16.5444 4.35597
16.5229 4.33058 16.4976 4.30519 16.4722 4.27882 16.4546 4.26125 16.4351
  4.24464 16.4155 4.22511 16.3921 4.20461 16.3667 4.18312 16.3394 4.16261
16.3159 4.14406 16.2925 4.12453 16.269 4.10695 16.2476 4.09035 16.2202
4.0757 16.1987 4.05714 16.1714 4.03957 16.1382 4.01906 16.1089 4.00148
16.0991 3.99562 16.0874 3.98781      16.0776 3.98097L9.37451
0.237808C8.46631 -0.266098 7.32568 0.0561676 6.81982 0.962418 6.31592
1.86476 6.63818 3.00929 7.54248 3.51515L9.91357 4.83644C3.90381 7.22023
-0.244629 13.1987 0.0112305 20.0112 0.050293 21.0484 0.92334 21.854 1.9585
21.8159      1.99756 21.815 2.03467 21.812 2.07373 21.8081 3.0542 21.7114
3.79834 20.8657 3.76318 19.8706 3.56006 14.5855 6.84912 9.96437 11.5581
8.22414L9.78076 11.4077C9.27295 12.314 9.59912 13.4566 10.5054 13.9614
10.8511 14.1548 11.2339 14.228 11.6011      14.1909 12.1929 14.1323
12.7456 13.7964 13.0562 13.2359L16.8003 6.53468C16.8081 6.51906 16.8159
6.50246 16.8237 6.48488 16.8354 6.46242 16.8472 6.43703 16.8608 6.41359
16.8745 6.38039 16.8882 6.34914 16.9038 6.31691Z"
                    verticalCenter="0" winding="nonZero">
                <s:fill>
                    <s:SolidColor color.disabled="#F2F2F2"
color.down="#FFD241"   color.over="#FFD241" color.up="#DCDCDC"/>
                </s:fill>
            </s:Path>
        </s:Group>
    </s:Group>



</s:SparkButtonSkin>




On 10/2/13 8:18 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:

>Hi,
>
>i'm using
>
><s:Button label="button" skinClass="spark.skins.SparkButtonSkin"/>
>
>got the error: Undefined state 'up'.
>
>
>do i have to to subclass SparkButtonSkin?
>
>(i want to put an icon on the Button)
>
>
>thanks


________________________________

Disclaimer: This electronic mail and any attachments are confidential and
may be privileged. If you are not the intended recipient, please notify the
sender immediately by replying to this email, and destroy all copies of this
email and any attachments. Thank you. 


Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

Posted by Frank Dahmen <fr...@dahmenia.de>.
no, i don't have it anymore

but i now i see that spark button has an icon property and 
spark.skins.spark.ButtonSkin (the default) does include it....out of the box

so i think the docs are wrong:

spark.components.Button:

"... The default skin has a text label. Define a custom skin class to add an 
image to the control. ..."



----- Original Message ----- 
From: "Maurice Amsellem" <ma...@systar.com>
To: <us...@flex.apache.org>
Sent: Wednesday, October 02, 2013 2:00 PM
Subject: RE: spark.skins.SparkButtonSkin -> Undefined state 'up'


Do you have the link where you see that ?

Maurice

-----Message d'origine-----
De : Frank Dahmen [mailto:frank@dahmenia.de]
Envoyé : mercredi 2 octobre 2013 13:12
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

ah, thanks

although i saw an example in the www which used it just as i did

thanks



----- Original Message ----- 
From: "Maurice Amsellem" <ma...@systar.com>
To: <us...@flex.apache.org>
Sent: Wednesday, October 02, 2013 11:05 AM
Subject: RE: spark.skins.SparkButtonSkin -> Undefined state 'up'


The required states for a skin are listed in the "skinStates" section of the
host component (in this case spark.components.Button):

(Apache)
http://flex.apache.org/asdoc/ => spark.components.Button => Skin States

(Adobe)
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Button.html#SkinStateSummary


Maurice


-----Message d'origine-----
De : Scott Matheson [mailto:smatheson@intralinks.com]
Envoyé : mercredi 2 octobre 2013 10:48
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

Frank
    I am not sure if this is your issue, with Skins you have to define all
the states the skin will need, even if you do not need these states in your
application, I have not found any documentation that define what states you
need for any skin


A button needs


<s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
</s:states>



I always start with the default item, button, button bar etc, then in visual
designer (4.6) click generate skin, then delete all the code that defines
the  button, then add my own code

This is a small example of a ICON in a button

In this example, it is the same icone with colors for each state

<s:SolidColor color.disabled="#F2F2F2" color.down="#FFD241"
color.over="#FFD241" color.up="#DCDCDC"/>



Scott

<?xml version="1.0" encoding="utf-8"?>

<!--

    ADOBE SYSTEMS INCORPORATED
    Copyright 2008 Adobe Systems Incorporated
    All Rights Reserved.

    NOTICE: Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the license agreement accompanying it.

-->

<!--- The default skin class for the Spark Button component.

       @see spark.components.Button

      @langversion 3.0
      @playerversion Flash 10
      @playerversion AIR 1.5
      @productversion Flex 4
-->
<s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                   width="21" height="22"
                   alpha.disabled="0.5"
                   >

<fx:Metadata>[HostComponent("com.peach.uofs.components.basic_navigation_pag
es.pips.JumpToGoToPage")]</fx:Metadata>



    <!-- states -->
    <s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
    </s:states>
    <s:layout>
        <s:ConstraintLayout/>
    </s:layout>


<s:Rect width="100%" height="100%" id="box" >
    <s:fill >
        <s:SolidColor alpha="0" />
    </s:fill>
</s:Rect>

    <s:Group  >
        <s:Group  >
            <s:Path left="4"
                    data="M16.9038 6.31691C16.9136 6.2925 16.9214 6.26711
16.9292 6.24171 16.9429 6.20851 16.9526 6.17531 16.9604 6.14211 16.9683
6.11769 16.9761 6.09132 16.9819 6.06691 16.9897 6.03078 16.9995 5.99562
17.0073 5.95851 17.0093 5.93605 17.0132 5.91164 17.019      5.88625
17.0249 5.84914 17.0269 5.81203 17.0308 5.77296 17.0308 5.7505 17.0327
5.72609 17.0347 5.70265 17.0366 5.66554 17.0366 5.6255 17.0366 5.58449
17.0366 5.57277 17.0366 5.56105 17.0366 5.54933 17.0366 5.53664 17.0327
5.52687 17.0327 5.5132      17.0308 5.47609 17.0269 5.44093 17.0249
5.40187 17.021 5.37648 17.0151 5.34914 17.0132 5.31984 17.0093 5.29054
17.0015 5.26027 16.9956 5.23 16.9878 5.19875 16.9819 5.1675 16.9741
5.13625 16.9663 5.11183 16.9565 5.08546 16.9507 5.06007 16.9429
5.02687 16.9312 4.99367 16.9155 4.96144 16.9077 4.93703 16.8999 4.91359
16.8901 4.89211 16.8765 4.85793 16.8608 4.8257 16.8452 4.7964 16.8335
4.77003 16.8198 4.74757 16.8062 4.72218 16.7925 4.69484 16.7788 4.66652
16.7612 4.64015 16.7437 4.61281      16.7261 4.58644 16.7104 4.56007
16.6929 4.53761 16.6772 4.51711 16.6616 4.49367 16.6401 4.46535 16.6167
4.43898 16.5952 4.41066 16.5796 4.39308 16.564 4.37453 16.5444 4.35597
16.5229 4.33058 16.4976 4.30519 16.4722 4.27882 16.4546 4.26125 16.4351
  4.24464 16.4155 4.22511 16.3921 4.20461 16.3667 4.18312 16.3394 4.16261
16.3159 4.14406 16.2925 4.12453 16.269 4.10695 16.2476 4.09035 16.2202
4.0757 16.1987 4.05714 16.1714 4.03957 16.1382 4.01906 16.1089 4.00148
16.0991 3.99562 16.0874 3.98781      16.0776 3.98097L9.37451
0.237808C8.46631 -0.266098 7.32568 0.0561676 6.81982 0.962418 6.31592
1.86476 6.63818 3.00929 7.54248 3.51515L9.91357 4.83644C3.90381 7.22023
-0.244629 13.1987 0.0112305 20.0112 0.050293 21.0484 0.92334 21.854 1.9585
21.8159      1.99756 21.815 2.03467 21.812 2.07373 21.8081 3.0542 21.7114
3.79834 20.8657 3.76318 19.8706 3.56006 14.5855 6.84912 9.96437 11.5581
8.22414L9.78076 11.4077C9.27295 12.314 9.59912 13.4566 10.5054 13.9614
10.8511 14.1548 11.2339 14.228 11.6011      14.1909 12.1929 14.1323
12.7456 13.7964 13.0562 13.2359L16.8003 6.53468C16.8081 6.51906 16.8159
6.50246 16.8237 6.48488 16.8354 6.46242 16.8472 6.43703 16.8608 6.41359
16.8745 6.38039 16.8882 6.34914 16.9038 6.31691Z"
                    verticalCenter="0" winding="nonZero">
                <s:fill>
                    <s:SolidColor color.disabled="#F2F2F2"
color.down="#FFD241"   color.over="#FFD241" color.up="#DCDCDC"/>
                </s:fill>
            </s:Path>
        </s:Group>
    </s:Group>



</s:SparkButtonSkin>




On 10/2/13 8:18 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:

>Hi,
>
>i'm using
>
><s:Button label="button" skinClass="spark.skins.SparkButtonSkin"/>
>
>got the error: Undefined state 'up'.
>
>
>do i have to to subclass SparkButtonSkin?
>
>(i want to put an icon on the Button)
>
>
>thanks


________________________________

Disclaimer: This electronic mail and any attachments are confidential and
may be privileged. If you are not the intended recipient, please notify the
sender immediately by replying to this email, and destroy all copies of this
email and any attachments. Thank you. 


RE: spark.skins.SparkButtonSkin -> Undefined state 'up'

Posted by Maurice Amsellem <ma...@systar.com>.
Do you have the link where you see that ? 

Maurice 

-----Message d'origine-----
De : Frank Dahmen [mailto:frank@dahmenia.de] 
Envoyé : mercredi 2 octobre 2013 13:12
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

ah, thanks

although i saw an example in the www which used it just as i did

thanks



----- Original Message ----- 
From: "Maurice Amsellem" <ma...@systar.com>
To: <us...@flex.apache.org>
Sent: Wednesday, October 02, 2013 11:05 AM
Subject: RE: spark.skins.SparkButtonSkin -> Undefined state 'up'


The required states for a skin are listed in the "skinStates" section of the 
host component (in this case spark.components.Button):

(Apache)
http://flex.apache.org/asdoc/ => spark.components.Button => Skin States

(Adobe)
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Button.html#SkinStateSummary


Maurice


-----Message d'origine-----
De : Scott Matheson [mailto:smatheson@intralinks.com]
Envoyé : mercredi 2 octobre 2013 10:48
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

Frank
    I am not sure if this is your issue, with Skins you have to define all 
the states the skin will need, even if you do not need these states in your 
application, I have not found any documentation that define what states you 
need for any skin


A button needs


<s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
</s:states>



I always start with the default item, button, button bar etc, then in visual 
designer (4.6) click generate skin, then delete all the code that defines 
the  button, then add my own code

This is a small example of a ICON in a button

In this example, it is the same icone with colors for each state

<s:SolidColor color.disabled="#F2F2F2" color.down="#FFD241"
color.over="#FFD241" color.up="#DCDCDC"/>



Scott

<?xml version="1.0" encoding="utf-8"?>

<!--

    ADOBE SYSTEMS INCORPORATED
    Copyright 2008 Adobe Systems Incorporated
    All Rights Reserved.

    NOTICE: Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the license agreement accompanying it.

-->

<!--- The default skin class for the Spark Button component.

       @see spark.components.Button

      @langversion 3.0
      @playerversion Flash 10
      @playerversion AIR 1.5
      @productversion Flex 4
-->
<s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                   width="21" height="22"
                   alpha.disabled="0.5"
                   >

<fx:Metadata>[HostComponent("com.peach.uofs.components.basic_navigation_pag
es.pips.JumpToGoToPage")]</fx:Metadata>



    <!-- states -->
    <s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
    </s:states>
    <s:layout>
        <s:ConstraintLayout/>
    </s:layout>


<s:Rect width="100%" height="100%" id="box" >
    <s:fill >
        <s:SolidColor alpha="0" />
    </s:fill>
</s:Rect>

    <s:Group  >
        <s:Group  >
            <s:Path left="4"
                    data="M16.9038 6.31691C16.9136 6.2925 16.9214 6.26711
16.9292 6.24171 16.9429 6.20851 16.9526 6.17531 16.9604 6.14211 16.9683
6.11769 16.9761 6.09132 16.9819 6.06691 16.9897 6.03078 16.9995 5.99562
17.0073 5.95851 17.0093 5.93605 17.0132 5.91164 17.019      5.88625
17.0249 5.84914 17.0269 5.81203 17.0308 5.77296 17.0308 5.7505 17.0327
5.72609 17.0347 5.70265 17.0366 5.66554 17.0366 5.6255 17.0366 5.58449
17.0366 5.57277 17.0366 5.56105 17.0366 5.54933 17.0366 5.53664 17.0327
5.52687 17.0327 5.5132      17.0308 5.47609 17.0269 5.44093 17.0249
5.40187 17.021 5.37648 17.0151 5.34914 17.0132 5.31984 17.0093 5.29054
17.0015 5.26027 16.9956 5.23 16.9878 5.19875 16.9819 5.1675 16.9741
5.13625 16.9663 5.11183 16.9565 5.08546 16.9507 5.06007 16.9429
5.02687 16.9312 4.99367 16.9155 4.96144 16.9077 4.93703 16.8999 4.91359
16.8901 4.89211 16.8765 4.85793 16.8608 4.8257 16.8452 4.7964 16.8335
4.77003 16.8198 4.74757 16.8062 4.72218 16.7925 4.69484 16.7788 4.66652
16.7612 4.64015 16.7437 4.61281      16.7261 4.58644 16.7104 4.56007
16.6929 4.53761 16.6772 4.51711 16.6616 4.49367 16.6401 4.46535 16.6167
4.43898 16.5952 4.41066 16.5796 4.39308 16.564 4.37453 16.5444 4.35597
16.5229 4.33058 16.4976 4.30519 16.4722 4.27882 16.4546 4.26125 16.4351
  4.24464 16.4155 4.22511 16.3921 4.20461 16.3667 4.18312 16.3394 4.16261
16.3159 4.14406 16.2925 4.12453 16.269 4.10695 16.2476 4.09035 16.2202
4.0757 16.1987 4.05714 16.1714 4.03957 16.1382 4.01906 16.1089 4.00148
16.0991 3.99562 16.0874 3.98781      16.0776 3.98097L9.37451
0.237808C8.46631 -0.266098 7.32568 0.0561676 6.81982 0.962418 6.31592
1.86476 6.63818 3.00929 7.54248 3.51515L9.91357 4.83644C3.90381 7.22023
-0.244629 13.1987 0.0112305 20.0112 0.050293 21.0484 0.92334 21.854 1.9585
21.8159      1.99756 21.815 2.03467 21.812 2.07373 21.8081 3.0542 21.7114
3.79834 20.8657 3.76318 19.8706 3.56006 14.5855 6.84912 9.96437 11.5581
8.22414L9.78076 11.4077C9.27295 12.314 9.59912 13.4566 10.5054 13.9614
10.8511 14.1548 11.2339 14.228 11.6011      14.1909 12.1929 14.1323
12.7456 13.7964 13.0562 13.2359L16.8003 6.53468C16.8081 6.51906 16.8159
6.50246 16.8237 6.48488 16.8354 6.46242 16.8472 6.43703 16.8608 6.41359
16.8745 6.38039 16.8882 6.34914 16.9038 6.31691Z"
                    verticalCenter="0" winding="nonZero">
                <s:fill>
                    <s:SolidColor color.disabled="#F2F2F2"
color.down="#FFD241"   color.over="#FFD241" color.up="#DCDCDC"/>
                </s:fill>
            </s:Path>
        </s:Group>
    </s:Group>



</s:SparkButtonSkin>




On 10/2/13 8:18 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:

>Hi,
>
>i'm using
>
><s:Button label="button" skinClass="spark.skins.SparkButtonSkin"/>
>
>got the error: Undefined state 'up'.
>
>
>do i have to to subclass SparkButtonSkin?
>
>(i want to put an icon on the Button)
>
>
>thanks


________________________________

Disclaimer: This electronic mail and any attachments are confidential and 
may be privileged. If you are not the intended recipient, please notify the 
sender immediately by replying to this email, and destroy all copies of this 
email and any attachments. Thank you. 


Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

Posted by Frank Dahmen <fr...@dahmenia.de>.
ah, thanks

although i saw an example in the www which used it just as i did

thanks



----- Original Message ----- 
From: "Maurice Amsellem" <ma...@systar.com>
To: <us...@flex.apache.org>
Sent: Wednesday, October 02, 2013 11:05 AM
Subject: RE: spark.skins.SparkButtonSkin -> Undefined state 'up'


The required states for a skin are listed in the "skinStates" section of the 
host component (in this case spark.components.Button):

(Apache)
http://flex.apache.org/asdoc/ => spark.components.Button => Skin States

(Adobe)
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Button.html#SkinStateSummary


Maurice


-----Message d'origine-----
De : Scott Matheson [mailto:smatheson@intralinks.com]
Envoyé : mercredi 2 octobre 2013 10:48
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

Frank
    I am not sure if this is your issue, with Skins you have to define all 
the states the skin will need, even if you do not need these states in your 
application, I have not found any documentation that define what states you 
need for any skin


A button needs


<s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
</s:states>



I always start with the default item, button, button bar etc, then in visual 
designer (4.6) click generate skin, then delete all the code that defines 
the  button, then add my own code

This is a small example of a ICON in a button

In this example, it is the same icone with colors for each state

<s:SolidColor color.disabled="#F2F2F2" color.down="#FFD241"
color.over="#FFD241" color.up="#DCDCDC"/>



Scott

<?xml version="1.0" encoding="utf-8"?>

<!--

    ADOBE SYSTEMS INCORPORATED
    Copyright 2008 Adobe Systems Incorporated
    All Rights Reserved.

    NOTICE: Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the license agreement accompanying it.

-->

<!--- The default skin class for the Spark Button component.

       @see spark.components.Button

      @langversion 3.0
      @playerversion Flash 10
      @playerversion AIR 1.5
      @productversion Flex 4
-->
<s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                   width="21" height="22"
                   alpha.disabled="0.5"
                   >

<fx:Metadata>[HostComponent("com.peach.uofs.components.basic_navigation_pag
es.pips.JumpToGoToPage")]</fx:Metadata>



    <!-- states -->
    <s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
    </s:states>
    <s:layout>
        <s:ConstraintLayout/>
    </s:layout>


<s:Rect width="100%" height="100%" id="box" >
    <s:fill >
        <s:SolidColor alpha="0" />
    </s:fill>
</s:Rect>

    <s:Group  >
        <s:Group  >
            <s:Path left="4"
                    data="M16.9038 6.31691C16.9136 6.2925 16.9214 6.26711
16.9292 6.24171 16.9429 6.20851 16.9526 6.17531 16.9604 6.14211 16.9683
6.11769 16.9761 6.09132 16.9819 6.06691 16.9897 6.03078 16.9995 5.99562
17.0073 5.95851 17.0093 5.93605 17.0132 5.91164 17.019      5.88625
17.0249 5.84914 17.0269 5.81203 17.0308 5.77296 17.0308 5.7505 17.0327
5.72609 17.0347 5.70265 17.0366 5.66554 17.0366 5.6255 17.0366 5.58449
17.0366 5.57277 17.0366 5.56105 17.0366 5.54933 17.0366 5.53664 17.0327
5.52687 17.0327 5.5132      17.0308 5.47609 17.0269 5.44093 17.0249
5.40187 17.021 5.37648 17.0151 5.34914 17.0132 5.31984 17.0093 5.29054
17.0015 5.26027 16.9956 5.23 16.9878 5.19875 16.9819 5.1675 16.9741
5.13625 16.9663 5.11183 16.9565 5.08546 16.9507 5.06007 16.9429
5.02687 16.9312 4.99367 16.9155 4.96144 16.9077 4.93703 16.8999 4.91359
16.8901 4.89211 16.8765 4.85793 16.8608 4.8257 16.8452 4.7964 16.8335
4.77003 16.8198 4.74757 16.8062 4.72218 16.7925 4.69484 16.7788 4.66652
16.7612 4.64015 16.7437 4.61281      16.7261 4.58644 16.7104 4.56007
16.6929 4.53761 16.6772 4.51711 16.6616 4.49367 16.6401 4.46535 16.6167
4.43898 16.5952 4.41066 16.5796 4.39308 16.564 4.37453 16.5444 4.35597
16.5229 4.33058 16.4976 4.30519 16.4722 4.27882 16.4546 4.26125 16.4351
  4.24464 16.4155 4.22511 16.3921 4.20461 16.3667 4.18312 16.3394 4.16261
16.3159 4.14406 16.2925 4.12453 16.269 4.10695 16.2476 4.09035 16.2202
4.0757 16.1987 4.05714 16.1714 4.03957 16.1382 4.01906 16.1089 4.00148
16.0991 3.99562 16.0874 3.98781      16.0776 3.98097L9.37451
0.237808C8.46631 -0.266098 7.32568 0.0561676 6.81982 0.962418 6.31592
1.86476 6.63818 3.00929 7.54248 3.51515L9.91357 4.83644C3.90381 7.22023
-0.244629 13.1987 0.0112305 20.0112 0.050293 21.0484 0.92334 21.854 1.9585
21.8159      1.99756 21.815 2.03467 21.812 2.07373 21.8081 3.0542 21.7114
3.79834 20.8657 3.76318 19.8706 3.56006 14.5855 6.84912 9.96437 11.5581
8.22414L9.78076 11.4077C9.27295 12.314 9.59912 13.4566 10.5054 13.9614
10.8511 14.1548 11.2339 14.228 11.6011      14.1909 12.1929 14.1323
12.7456 13.7964 13.0562 13.2359L16.8003 6.53468C16.8081 6.51906 16.8159
6.50246 16.8237 6.48488 16.8354 6.46242 16.8472 6.43703 16.8608 6.41359
16.8745 6.38039 16.8882 6.34914 16.9038 6.31691Z"
                    verticalCenter="0" winding="nonZero">
                <s:fill>
                    <s:SolidColor color.disabled="#F2F2F2"
color.down="#FFD241"   color.over="#FFD241" color.up="#DCDCDC"/>
                </s:fill>
            </s:Path>
        </s:Group>
    </s:Group>



</s:SparkButtonSkin>




On 10/2/13 8:18 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:

>Hi,
>
>i'm using
>
><s:Button label="button" skinClass="spark.skins.SparkButtonSkin"/>
>
>got the error: Undefined state 'up'.
>
>
>do i have to to subclass SparkButtonSkin?
>
>(i want to put an icon on the Button)
>
>
>thanks


________________________________

Disclaimer: This electronic mail and any attachments are confidential and 
may be privileged. If you are not the intended recipient, please notify the 
sender immediately by replying to this email, and destroy all copies of this 
email and any attachments. Thank you. 


RE: spark.skins.SparkButtonSkin -> Undefined state 'up'

Posted by Maurice Amsellem <ma...@systar.com>.
The required states for a skin are listed in the "skinStates" section of the host component (in this case spark.components.Button):

(Apache)
http://flex.apache.org/asdoc/ => spark.components.Button => Skin States

(Adobe)
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Button.html#SkinStateSummary


Maurice 


-----Message d'origine-----
De : Scott Matheson [mailto:smatheson@intralinks.com] 
Envoyé : mercredi 2 octobre 2013 10:48
À : users@flex.apache.org
Objet : Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

Frank
    I am not sure if this is your issue, with Skins you have to define all the states the skin will need, even if you do not need these states in your application, I have not found any documentation that define what states you need for any skin


A button needs


<s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
</s:states>



I always start with the default item, button, button bar etc, then in visual designer (4.6) click generate skin, then delete all the code that defines the  button, then add my own code

This is a small example of a ICON in a button

In this example, it is the same icone with colors for each state

<s:SolidColor color.disabled="#F2F2F2" color.down="#FFD241"
color.over="#FFD241" color.up="#DCDCDC"/>



Scott

<?xml version="1.0" encoding="utf-8"?>

<!--

    ADOBE SYSTEMS INCORPORATED
    Copyright 2008 Adobe Systems Incorporated
    All Rights Reserved.

    NOTICE: Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the license agreement accompanying it.

-->

<!--- The default skin class for the Spark Button component.

       @see spark.components.Button

      @langversion 3.0
      @playerversion Flash 10
      @playerversion AIR 1.5
      @productversion Flex 4
-->
<s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                   width="21" height="22"
                   alpha.disabled="0.5"
                   >

<fx:Metadata>[HostComponent("com.peach.uofs.components.basic_navigation_pag
es.pips.JumpToGoToPage")]</fx:Metadata>



    <!-- states -->
    <s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
    </s:states>
    <s:layout>
        <s:ConstraintLayout/>
    </s:layout>


<s:Rect width="100%" height="100%" id="box" >
    <s:fill >
        <s:SolidColor alpha="0" />
    </s:fill>
</s:Rect>

    <s:Group  >
        <s:Group  >
            <s:Path left="4"
                    data="M16.9038 6.31691C16.9136 6.2925 16.9214 6.26711
16.9292 6.24171 16.9429 6.20851 16.9526 6.17531 16.9604 6.14211 16.9683
6.11769 16.9761 6.09132 16.9819 6.06691 16.9897 6.03078 16.9995 5.99562
17.0073 5.95851 17.0093 5.93605 17.0132 5.91164 17.019      5.88625
17.0249 5.84914 17.0269 5.81203 17.0308 5.77296 17.0308 5.7505 17.0327
5.72609 17.0347 5.70265 17.0366 5.66554 17.0366 5.6255 17.0366 5.58449
17.0366 5.57277 17.0366 5.56105 17.0366 5.54933 17.0366 5.53664 17.0327
5.52687 17.0327 5.5132      17.0308 5.47609 17.0269 5.44093 17.0249
5.40187 17.021 5.37648 17.0151 5.34914 17.0132 5.31984 17.0093 5.29054
17.0015 5.26027 16.9956 5.23 16.9878 5.19875 16.9819 5.1675 16.9741
5.13625 16.9663 5.11183 16.9565 5.08546 16.9507 5.06007 16.9429
5.02687 16.9312 4.99367 16.9155 4.96144 16.9077 4.93703 16.8999 4.91359
16.8901 4.89211 16.8765 4.85793 16.8608 4.8257 16.8452 4.7964 16.8335
4.77003 16.8198 4.74757 16.8062 4.72218 16.7925 4.69484 16.7788 4.66652
16.7612 4.64015 16.7437 4.61281      16.7261 4.58644 16.7104 4.56007
16.6929 4.53761 16.6772 4.51711 16.6616 4.49367 16.6401 4.46535 16.6167
4.43898 16.5952 4.41066 16.5796 4.39308 16.564 4.37453 16.5444 4.35597
16.5229 4.33058 16.4976 4.30519 16.4722 4.27882 16.4546 4.26125 16.4351
  4.24464 16.4155 4.22511 16.3921 4.20461 16.3667 4.18312 16.3394 4.16261
16.3159 4.14406 16.2925 4.12453 16.269 4.10695 16.2476 4.09035 16.2202
4.0757 16.1987 4.05714 16.1714 4.03957 16.1382 4.01906 16.1089 4.00148
16.0991 3.99562 16.0874 3.98781      16.0776 3.98097L9.37451
0.237808C8.46631 -0.266098 7.32568 0.0561676 6.81982 0.962418 6.31592
1.86476 6.63818 3.00929 7.54248 3.51515L9.91357 4.83644C3.90381 7.22023
-0.244629 13.1987 0.0112305 20.0112 0.050293 21.0484 0.92334 21.854 1.9585
21.8159      1.99756 21.815 2.03467 21.812 2.07373 21.8081 3.0542 21.7114
3.79834 20.8657 3.76318 19.8706 3.56006 14.5855 6.84912 9.96437 11.5581
8.22414L9.78076 11.4077C9.27295 12.314 9.59912 13.4566 10.5054 13.9614
10.8511 14.1548 11.2339 14.228 11.6011      14.1909 12.1929 14.1323
12.7456 13.7964 13.0562 13.2359L16.8003 6.53468C16.8081 6.51906 16.8159
6.50246 16.8237 6.48488 16.8354 6.46242 16.8472 6.43703 16.8608 6.41359
16.8745 6.38039 16.8882 6.34914 16.9038 6.31691Z"
                    verticalCenter="0" winding="nonZero">
                <s:fill>
                    <s:SolidColor color.disabled="#F2F2F2"
color.down="#FFD241"   color.over="#FFD241" color.up="#DCDCDC"/>
                </s:fill>
            </s:Path>
        </s:Group>
    </s:Group>



</s:SparkButtonSkin>




On 10/2/13 8:18 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:

>Hi,
>
>i'm using
>
><s:Button label="button" skinClass="spark.skins.SparkButtonSkin"/>
>
>got the error: Undefined state 'up'.
>
>
>do i have to to subclass SparkButtonSkin?
>
>(i want to put an icon on the Button)
>
>
>thanks


________________________________

Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.

RE: spark.skins.SparkButtonSkin -> Undefined state 'up'

Posted by Maurice Amsellem <ma...@systar.com>.
Sorry, I meant spark.skins.spark.ButtonSkin

-----Message d'origine-----
De : Maurice Amsellem 
Envoyé : mercredi 2 octobre 2013 10:59
À : users@flex.apache.org
Objet : RE: spark.skins.SparkButtonSkin -> Undefined state 'up'

Actually, SparkButtonSkin is an abstract  skin class, so it does not have any states and cannot be used directly.

The default skin for "normal" buttons is spark.skins.ButtonSkin.

If you want to customize the skin to add an icon, copy-paste the code from ButtonSkin and customize it.

Regards,

Maurice

-----Message d'origine-----
De : Frank Dahmen [mailto:frank@dahmenia.de] Envoyé : mercredi 2 octobre 2013 09:19 À : users@flex.apache.org Objet : spark.skins.SparkButtonSkin -> Undefined state 'up'

Hi,

i'm using

<s:Button label="button" skinClass="spark.skins.SparkButtonSkin"/>

got the error: Undefined state 'up'.


do i have to to subclass SparkButtonSkin?

(i want to put an icon on the Button)


thanks

RE: spark.skins.SparkButtonSkin -> Undefined state 'up'

Posted by Maurice Amsellem <ma...@systar.com>.
Actually, SparkButtonSkin is an abstract  skin class, so it does not have any states and cannot be used directly.

The default skin for "normal" buttons is spark.skins.ButtonSkin.

If you want to customize the skin to add an icon, copy-paste the code from ButtonSkin and customize it.

Regards,

Maurice

-----Message d'origine-----
De : Frank Dahmen [mailto:frank@dahmenia.de] 
Envoyé : mercredi 2 octobre 2013 09:19
À : users@flex.apache.org
Objet : spark.skins.SparkButtonSkin -> Undefined state 'up'

Hi,

i'm using

<s:Button label="button" skinClass="spark.skins.SparkButtonSkin"/>

got the error: Undefined state 'up'.


do i have to to subclass SparkButtonSkin?

(i want to put an icon on the Button)


thanks

Re: spark.skins.SparkButtonSkin -> Undefined state 'up'

Posted by Scott Matheson <sm...@intralinks.com>.
Frank
    I am not sure if this is your issue, with Skins you have to define all
the states the skin will need, even if you do not need these states in
your application, I have not found any documentation that define what
states you need for any skin


A button needs


<s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
</s:states>



I always start with the default item, button, button bar etc, then in
visual designer (4.6) click generate skin, then delete all the code that
defines the  button, then add my own code

This is a small example of a ICON in a button

In this example, it is the same icone with colors for each state

<s:SolidColor color.disabled="#F2F2F2" color.down="#FFD241"
color.over="#FFD241" color.up="#DCDCDC"/>



Scott

<?xml version="1.0" encoding="utf-8"?>

<!--

    ADOBE SYSTEMS INCORPORATED
    Copyright 2008 Adobe Systems Incorporated
    All Rights Reserved.

    NOTICE: Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the license agreement accompanying it.

-->

<!--- The default skin class for the Spark Button component.

       @see spark.components.Button

      @langversion 3.0
      @playerversion Flash 10
      @playerversion AIR 1.5
      @productversion Flex 4
-->
<s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                   width="21" height="22"
                   alpha.disabled="0.5"
                   >

<fx:Metadata>[HostComponent("com.peach.uofs.components.basic_navigation_pag
es.pips.JumpToGoToPage")]</fx:Metadata>



    <!-- states -->
    <s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
    </s:states>
    <s:layout>
        <s:ConstraintLayout/>
    </s:layout>


<s:Rect width="100%" height="100%" id="box" >
    <s:fill >
        <s:SolidColor alpha="0" />
    </s:fill>
</s:Rect>

    <s:Group  >
        <s:Group  >
            <s:Path left="4"
                    data="M16.9038 6.31691C16.9136 6.2925 16.9214 6.26711
16.9292 6.24171 16.9429 6.20851 16.9526 6.17531 16.9604 6.14211 16.9683
6.11769 16.9761 6.09132 16.9819 6.06691 16.9897 6.03078 16.9995 5.99562
17.0073 5.95851 17.0093 5.93605 17.0132 5.91164 17.019      5.88625
17.0249 5.84914 17.0269 5.81203 17.0308 5.77296 17.0308 5.7505 17.0327
5.72609 17.0347 5.70265 17.0366 5.66554 17.0366 5.6255 17.0366 5.58449
17.0366 5.57277 17.0366 5.56105 17.0366 5.54933 17.0366 5.53664 17.0327
5.52687 17.0327 5.5132      17.0308 5.47609 17.0269 5.44093 17.0249
5.40187 17.021 5.37648 17.0151 5.34914 17.0132 5.31984 17.0093 5.29054
17.0015 5.26027 16.9956 5.23 16.9878 5.19875 16.9819 5.1675 16.9741
5.13625 16.9663 5.11183 16.9565 5.08546 16.9507 5.06007 16.9429
5.02687 16.9312 4.99367 16.9155 4.96144 16.9077 4.93703 16.8999 4.91359
16.8901 4.89211 16.8765 4.85793 16.8608 4.8257 16.8452 4.7964 16.8335
4.77003 16.8198 4.74757 16.8062 4.72218 16.7925 4.69484 16.7788 4.66652
16.7612 4.64015 16.7437 4.61281      16.7261 4.58644 16.7104 4.56007
16.6929 4.53761 16.6772 4.51711 16.6616 4.49367 16.6401 4.46535 16.6167
4.43898 16.5952 4.41066 16.5796 4.39308 16.564 4.37453 16.5444 4.35597
16.5229 4.33058 16.4976 4.30519 16.4722 4.27882 16.4546 4.26125 16.4351
  4.24464 16.4155 4.22511 16.3921 4.20461 16.3667 4.18312 16.3394 4.16261
16.3159 4.14406 16.2925 4.12453 16.269 4.10695 16.2476 4.09035 16.2202
4.0757 16.1987 4.05714 16.1714 4.03957 16.1382 4.01906 16.1089 4.00148
16.0991 3.99562 16.0874 3.98781      16.0776 3.98097L9.37451
0.237808C8.46631 -0.266098 7.32568 0.0561676 6.81982 0.962418 6.31592
1.86476 6.63818 3.00929 7.54248 3.51515L9.91357 4.83644C3.90381 7.22023
-0.244629 13.1987 0.0112305 20.0112 0.050293 21.0484 0.92334 21.854 1.9585
21.8159      1.99756 21.815 2.03467 21.812 2.07373 21.8081 3.0542 21.7114
3.79834 20.8657 3.76318 19.8706 3.56006 14.5855 6.84912 9.96437 11.5581
8.22414L9.78076 11.4077C9.27295 12.314 9.59912 13.4566 10.5054 13.9614
10.8511 14.1548 11.2339 14.228 11.6011      14.1909 12.1929 14.1323
12.7456 13.7964 13.0562 13.2359L16.8003 6.53468C16.8081 6.51906 16.8159
6.50246 16.8237 6.48488 16.8354 6.46242 16.8472 6.43703 16.8608 6.41359
16.8745 6.38039 16.8882 6.34914 16.9038 6.31691Z"
                    verticalCenter="0" winding="nonZero">
                <s:fill>
                    <s:SolidColor color.disabled="#F2F2F2"
color.down="#FFD241"   color.over="#FFD241" color.up="#DCDCDC"/>
                </s:fill>
            </s:Path>
        </s:Group>
    </s:Group>



</s:SparkButtonSkin>




On 10/2/13 8:18 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:

>Hi,
>
>i'm using
>
><s:Button label="button" skinClass="spark.skins.SparkButtonSkin"/>
>
>got the error: Undefined state 'up'.
>
>
>do i have to to subclass SparkButtonSkin?
>
>(i want to put an icon on the Button)
>
>
>thanks


________________________________

Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.

spark.skins.SparkButtonSkin -> Undefined state 'up'

Posted by Frank Dahmen <fr...@dahmenia.de>.
Hi,

i'm using

<s:Button label="button" skinClass="spark.skins.SparkButtonSkin"/>

got the error: Undefined state 'up'.


do i have to to subclass SparkButtonSkin?

(i want to put an icon on the Button)


thanks

Re: Validate two fields in a validator

Posted by Shervin Asgari <sh...@webstep.no>.
Thanks guys.

I got it working.


2013/9/26 Miguel Ferreira <mi...@hotmail.com>

> try to use it with a fix date to see if it work correctly.
> Then you can use change event to set that properties.
> For example, if a user choose first the date to then the date from
> rangeend should be also updated you can trigger this settings when a change
> event is trigerred.
> after you finished this then you can go to the validator.
> This weekend i can try to create one and share it
>
> > Date: Thu, 26 Sep 2013 15:35:09 +0200
> > Subject: Re: Validate two fields in a validator
> > From: shervin.asgari@webstep.no
> > To: users@flex.apache.org
> >
> > This is what I have tried to do unsuccessful for now.
> >
> > I will keep at it.
> >
> > The startRange seemed like a good idea, but I haven't made that work yet.
> >
> > I have tried to do something like this: inputDate.selectableRange =
> > {rangeStart: otherInputDate.selectedDate};
> > However when I click the calendar button, it shows the year as 0
> > Clearly something is wrong
> >
> >
> > 2013/9/26 christofer.dutz@c-ware.de <ch...@c-ware.de>
> >
> > > As you Need to validate if the date field changes or the reference date
> > > changes, you will Need to build a custom Validator which you can then
> bind
> > > to both fields.
> > >
> > > Chris
> > >
> > > ________________________________________
> > > Von: Shervin Asgari [shervin.asgari@webstep.no]
> > > Gesendet: Donnerstag, 26. September 2013 14:14
> > > An: users@flex.apache.org
> > > Betreff: Validate two fields in a validator
> > >
> > > Hi.
> > >
> > > I have a date validator on each field which validates if they are a
> correct
> > > date.
> > > However, in one of the two date fields, I need to validate if it is
> after
> > > the other date.
> > >
> > > So this means I have to somehow get the other inputfield date in my
> > > validator.
> > > I have tried to do this using a listener on the other field, but it
> > > retrieves null.
> > >
> > > Any ideas how I can do this?
> > >
> > > Shervin
> > >
>
>

RE: Validate two fields in a validator

Posted by Miguel Ferreira <mi...@hotmail.com>.
try to use it with a fix date to see if it work correctly.
Then you can use change event to set that properties.
For example, if a user choose first the date to then the date from rangeend should be also updated you can trigger this settings when a change event is trigerred.
after you finished this then you can go to the validator.
This weekend i can try to create one and share it

> Date: Thu, 26 Sep 2013 15:35:09 +0200
> Subject: Re: Validate two fields in a validator
> From: shervin.asgari@webstep.no
> To: users@flex.apache.org
> 
> This is what I have tried to do unsuccessful for now.
> 
> I will keep at it.
> 
> The startRange seemed like a good idea, but I haven't made that work yet.
> 
> I have tried to do something like this: inputDate.selectableRange =
> {rangeStart: otherInputDate.selectedDate};
> However when I click the calendar button, it shows the year as 0
> Clearly something is wrong
> 
> 
> 2013/9/26 christofer.dutz@c-ware.de <ch...@c-ware.de>
> 
> > As you Need to validate if the date field changes or the reference date
> > changes, you will Need to build a custom Validator which you can then bind
> > to both fields.
> >
> > Chris
> >
> > ________________________________________
> > Von: Shervin Asgari [shervin.asgari@webstep.no]
> > Gesendet: Donnerstag, 26. September 2013 14:14
> > An: users@flex.apache.org
> > Betreff: Validate two fields in a validator
> >
> > Hi.
> >
> > I have a date validator on each field which validates if they are a correct
> > date.
> > However, in one of the two date fields, I need to validate if it is after
> > the other date.
> >
> > So this means I have to somehow get the other inputfield date in my
> > validator.
> > I have tried to do this using a listener on the other field, but it
> > retrieves null.
> >
> > Any ideas how I can do this?
> >
> > Shervin
> >
 		 	   		  

Re: Validate two fields in a validator

Posted by Shervin Asgari <sh...@webstep.no>.
This is what I have tried to do unsuccessful for now.

I will keep at it.

The startRange seemed like a good idea, but I haven't made that work yet.

I have tried to do something like this: inputDate.selectableRange =
{rangeStart: otherInputDate.selectedDate};
However when I click the calendar button, it shows the year as 0
Clearly something is wrong


2013/9/26 christofer.dutz@c-ware.de <ch...@c-ware.de>

> As you Need to validate if the date field changes or the reference date
> changes, you will Need to build a custom Validator which you can then bind
> to both fields.
>
> Chris
>
> ________________________________________
> Von: Shervin Asgari [shervin.asgari@webstep.no]
> Gesendet: Donnerstag, 26. September 2013 14:14
> An: users@flex.apache.org
> Betreff: Validate two fields in a validator
>
> Hi.
>
> I have a date validator on each field which validates if they are a correct
> date.
> However, in one of the two date fields, I need to validate if it is after
> the other date.
>
> So this means I have to somehow get the other inputfield date in my
> validator.
> I have tried to do this using a listener on the other field, but it
> retrieves null.
>
> Any ideas how I can do this?
>
> Shervin
>

AW: Validate two fields in a validator

Posted by "christofer.dutz@c-ware.de" <ch...@c-ware.de>.
As you Need to validate if the date field changes or the reference date changes, you will Need to build a custom Validator which you can then bind to both fields.

Chris

________________________________________
Von: Shervin Asgari [shervin.asgari@webstep.no]
Gesendet: Donnerstag, 26. September 2013 14:14
An: users@flex.apache.org
Betreff: Validate two fields in a validator

Hi.

I have a date validator on each field which validates if they are a correct
date.
However, in one of the two date fields, I need to validate if it is after
the other date.

So this means I have to somehow get the other inputfield date in my
validator.
I have tried to do this using a listener on the other field, but it
retrieves null.

Any ideas how I can do this?

Shervin