pashminakazi commented on issue #661: ColorPicker is not working
URL: https://github.com/apache/royale-asjs/issues/661#issuecomment-575043085
 
 
   Ok thank u so much Alex
   
   On Thu, Jan 16, 2020, 1:13 PM aharui <notificati...@github.com> wrote:
   
   > Your application is set up more like:
   >
   > <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
   >                 xmlns:mx="library://ns.apache.org/royale/mx"
   >                 xmlns:s="library://ns.apache.org/royale/spark"
   >                 width="600" height="400" >
   >     <!-- to do: layout="absolute" minWidth="955" minHeight="600" -->
   >     <fx:Script>
   >         <![CDATA[
   >             import mx.events.ColorPickerEvent;
   >             import spark.components.TextInput;
   >
   >             [Bindable]
   >             private var valueObj:ValueObj = new ValueObj();
   >
   >             public function changeEvt(event:ColorPickerEvent):void
   >             {
   >                 purchaseRequColor.text = event.currentTarget.selectedItem;
   >                 valueObj.purchaseRequColor = purchaseRequColor.text;
   >             }
   >         ]]>
   >     </fx:Script>
   >     <s:Label  text="Colour" x="146" y="226.5"/>
   >     <s:TextInput id="purchaseRequColor" contentBackgroundColor="{(valueObj 
== null) ? 0xFFFFFF : valueObj.purchaseRequColor}" width="100" tabIndex="3" 
maxChars="30"  x="187" y="223" height="19"/>        
   >     <mx:ColorPicker id="purchaseColor" change="changeEvt(event);" x="296" 
y="223" height="19" width="108"/>
   >
   >
   > </mx:Application>
   >
   > where ValueObj looks like:
   >
   > package {
   >
   > [Bindable]
   > public class ValueObj
   > {
   >     public var purchaseRequColor:String = "#ffeedd";
   > }
   > }
   >
   > I thought I had tested that locally, but apparently not as that scenario
   > is not working. The binding expression is not being set up correctly. It is
   > not handling the private bindable. I will look into it tomorrow unless
   > someone else can get to it sooner, but you can use the setStyle as a
   > workaround.
   >
   > —
   > You are receiving this because you modified the open/close state.
   > Reply to this email directly, view it on GitHub
   > 
<https://github.com/apache/royale-asjs/issues/661?email_source=notifications&email_token=AKB67E27IHAXGNXJOSJFQW3Q6AJKFA5CNFSM4KED5KXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJDFKTQ#issuecomment-575034702>,
   > or unsubscribe
   > 
<https://github.com/notifications/unsubscribe-auth/AKB67E7MZ2YV6VEPVGLNBWTQ6AJKFANCNFSM4KED5KXA>
   > .
   >
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to