Flex :: Binding ChangeWatcher Bind To A Negative Condition

Jan 7, 2011

I have a bindable getter in a component which informs me when a [hidden] timer is running. I also have a context menu which, if this timer is running, should disable one of the menu items.Is it possible to create a ChangeWatcher which watches for the negative condition of a bindable property/getter and changes the enabled property of the menu item?Class B:[code]In the code above, I have the inverse case: when isPlaying() is true, the menu item is enabled; I want it to only be enabled when the condition is false.[code]

View 1 Replies


Similar Posts:


Binding - Flex ChangeWatcher Doesn't Work?

Jul 9, 2010

I'm trying to implement a binding between some custom-built models and just beginning to dabble with the whole mx.binding.* collection. I tried this simple, stripped down example, but can't get the binding working correctly. Can somebody tell me where I'm going wrong?

[Code]...

View 3 Replies

Flash - Flex - Condition In Binding (for TextInput Prop. Text)?

May 26, 2011

For example <s:TextInput id="sd" text="{if () {0} else if() {1} else {2}}"/>

Is it possible to do something like that?

View 2 Replies

Flex :: Binding - Bind Property Of View To Property Of Class Using MATE?

Jan 9, 2011

Lately i discovered MATE (for Flex development) and was wondering: how do i bind a property in a view (actually a navigatorcontent component) to another property in a class so that they stay in synchronization (meaning that whenever the property in the class changes the property in the view also changes).

So if we have a view called Target.mxml and a property targertProp how do we bind it to the class called SourceClass with property SourceProp?

View 3 Replies

Flex :: Data Binding Re-bind When Data Model Not Change, Possible?

Nov 4, 2011

If user change the value of the TextInput, then click refresh button to retrieve the data model from backend again, the GUI value will not change back. Re-binding not happen, Since the value of data model not changed, no propertyChanged event fired.In this case, I must Programmatically set the model value to the GUI after data refreshing done.I know bi-directional binding can solve this problem(when user change value on GUI, set the new value to data model immediately). But sometimes I cannot use bi-directional binding, for example, the data model is a int, but user input a non-int value, I cannot set the value to data model. So the value in data model do not change, when refresh data, rebinding still not happen.

This will make the data binding useless. How to resolve this?I put pseudo-code here for now, I will put real code later:1. retrieve a data model from server, via blazeds or something else.2. bind the model to a TextInput on GUI.3. user change the TextInput text.4. User click a refresh button, triger retrieve the model value again.5. Now since the model value do not change, no PropertyChanged event fired.6. GUI value still is the user's input, not the value from the model. can clear the model value before set the velue back, make re-binding happen.(but sometimes you do not know how to clean the model value, take int for example, you may do not know the original value and happen set the same value). Or I can manually set the model value to GUI. But both are not good looking.

View 3 Replies

Flex :: Get ChangeWatcher To Fire When XML Is Appended To?

Feb 25, 2010

So I had a requirement to add an undo function to my app and I discovered this nifty ChangeWatcher class, but it's not doing exactly what I want and I'm hoping someone knows how.ChangeWatcher seems to monitor assignments to the variable reference. So when I say:

myXML = <xml/>

it fires off it's function just fine and dandy, but when I say: myXML.appendChild(thisOtherXMLVar)

I get nothing, even though the variable changes the reference doesn't so ChangeWatcher doesn't fire off the function.how to get ChangeWatcher to pick up on all changes to a variable?

View 1 Replies

Flex :: ChangeWatcher On A [Bindable] Variable Not Working?

May 26, 2011

I have a Number variable, named isConflict, whose value is passed in from a parent. I would like to put a ChangeWatcher on this item so that a function named changeBGColor will run whenever the value is changed. Within my creationComplete function of init, i have the following:

var isConflictWatch:ChangeWatcher = BindingUtils.bindSetter(changeBGColor, this, "isConflictChain");

View 1 Replies

Flex :: ChangeWatcher Not Firing On Bound Property Change?

Sep 30, 2010

On creation complete my parent component executes an "init" function which simply sets public bindable variables in child components. I'd like the child components to watch these variables and upon being set use them. However, for some reason the ChangeWatcher is not firing with the change of the variable. Below is my code;

Parent Component
private function init():void
{
userInfo.user = new User("Tom");

[Code]....

View 1 Replies

Flex :: Binding To An MXML-esque "binding String"?

Oct 13, 2009

Is it possible to specify MXML-esque "binding strings" in ActionScript?For example, I want to be able to do something like:

MXMLBinding(this, "first_item",
this, "{myArrayCollection.getItemAt(0)");
MXMLBinding(this, ["nameLbl", "text"],

[code].....

View 6 Replies

Flex :: Bind Xml Node Value To Dropdown Data Field In Flex?

Nov 2, 2010

I have an XML object like this[code]...

but how to add the id attribute as the 'data' field of the dropdown so when an item is selected, it returns that field?

View 1 Replies

Flex Application Bind To Url

Jul 9, 2011

The problem with flex applications is that a user can download it and run it on his local machine or possibly host it on another site. Is it possible to lock a flex application to a domain name to prevent such acts?

View 3 Replies

Flex :: Bind To Object Property

Nov 25, 2011

[code]...

The labels text will be "Property", but if object.property is changed, the label isn't updated. Is there any way around this?

View 2 Replies

Flex :: Bind An Object Across Other Tabs?

Feb 14, 2012

I am having a table at the backend, so when a query is asked at the frontend for an object, all the tabs in the front end should be populated with the details of the query object. I am able to pick the query object at the back end , but i dont know how to bind that object across all the tabs in flex. I am getting an error type coercion failed, cannot convert X to mx:Array collection

View 1 Replies

Flex :: Bind XMLListCollection Into Model?

Mar 24, 2012

When the XMLListCollection is updated in the DataGrid, I want it to add the XML (bind it) into the Model. How would I do this? Or if not possible, how would I manually add XML into the Model?

This is a rough example of what I'm trying to do. Adding data to the DataGrid works fine; it just doesn't go into the Model when sending to the HTTPService.

<mx:Model id="model">
<root><colors>{collection}</colors></root>
</mx:Model>
<mx:XMLListCollection id="collection" />

[Code]....

View 1 Replies

Flex :: Change Style For Positive And Negative Values?

Jul 6, 2009

Is there a way to change the style of Flex Chart according to the values.For example, in column chart, set green for positive value and red for negative value?

View 1 Replies

Flex :: Show Data Label When The Values Are Negative?

May 28, 2011

I have a bar chart where I'm trying to get the data labels to show. When the values are all positive the data labels appear fine. When I mix in some negative values, the datalabels don't show:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[code].....

View 1 Replies

Flex :: Cannot Restrict NumericStepper To Include Negative Sign?

Dec 19, 2011

I want to restrict my NumericStepper so that you can't type invalid characters into it (like a comma). I'm trying this, and it works:
<s:initialize>
stepper.textDisplay.restrict = "0-9 - .";
</s:initialize>
<s:NumericStepper id="stepper" />

Except the negative sign can't be typed anymore, even though I specify it. If I do it directly on a TextInput, it works:
<s:TextInput restrict="0-9 - ." minimum="-10" />
Why doesn't this work?

View 1 Replies

Bind My Flex Builder To My Django Application?

Jul 19, 2009

Usually when I run my application Flex Builder creates a file in a directory on my local PC and then opens a browser and points to it. Everything was fine, but when I decided to link django server to flex applications via xml data providers I started to get security errors. (Related to absence of crossdomain.xml). When I created the file and put it on the server[code]...

View 3 Replies

Flex :: Cannot Bind Data To DropDownList Control

Sep 8, 2010

I'm fetching some data from a PHP application using Zend AMF. However I can't get the data to bind to a simple DropDownList control. The PHP method is:

[Code]...

View 2 Replies

Flex :: Bind A Datagrid Item To A Combox?

Jun 15, 2009

I am trying to bind a datagrid item to a combox, so that when the user selects the item in the datagrid the form displays the selected data for editing, however one of my items is a combobox using a dataprovider.

I would like the item selected in the datagrid to match the selected item in the combobox, this part is fine however if my datagrid item is null then I cannot get the combox to set the selected index to -1?(the same happens if you use the CRUD wizard in Flex builder 3 for ColdFusion)I am using the following code for my custom combobox:

<mx:ComboBox
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*"
creationComplete="componentInit()"

[code].....

View 2 Replies

Actionscript :: Disable Warning (especially Binding Warnings) In Console In Flex (eclipse With Flex Plugin)?

Nov 10, 2010

I did suppress warnings in flex compiler using "-show-binding-warnings=false". But what I am interested to achieve is to suppress run time warnings (especially binding warnings - since I am getting data in model mostly in XML structures and it is fine for me if its unable to bind to its nested child nodes) in console (I am working on flex on Eclipse with the flex plug in). Is there a way to achieve it?

View 1 Replies

ActionScript 3.0 :: Use ChangeWatcher In Flash?

Jun 9, 2010

Can I use ChangeWatcher in flash actionscript code? I am testing the code below. It compiles without any error but 'doSomething' is never fired when buttons.left value changes.

import mx.binding.utils.*;
import flash.events.*;
import mx.events.PropertyChangeEvent;

[code]....

View 2 Replies

Actionscript 3 :: Flex Chart : Horizontal Line At 0 When Having Negative Values?

Nov 24, 2009

I have a Flex Column Chart, which shows bars with each positive and negative values.I only want to have a horizontal line at 0 to distinguish between positive and negative values.I turned off all the axis.How could I achieve to get this line?

View 1 Replies

Flex :: Specify More Than 1 Condition With && For A Property?

Sep 16, 2010

I need to specify more than one condition for visibiltyvisible="{data.allow && data.open}"However, this gives the error "The entity name must immediately follow the '&' in the entity reference."I could use a function, but I'd like to know if it is possible to do this directly with different syntax.

View 1 Replies

Flex :: Bind To Global Variables Inside Component?

Aug 19, 2009

I've developed a component which is a combination of a few items (canvas, labels, etc...) but when I try to bind it to a variable such as: {stationXML.getItemAt(1).AAA.@value}, it doesnt work. Before I combined all the items in a component, they were all in the main MXML file at which time they worked. Not sure if it matters, but the "stationXML" arraycollection variable is declared inside the file "Station.as".

View 2 Replies

Flex :: Bind Class Property To Mxml Component?

Nov 25, 2009

Is is possible to bind class properties to mxml components ? E.g.: I have a class A.as with a String property nameValue. What I want to achieve is always having the latest value of a mx:Text component in nameValue.

View 2 Replies

Flex :: Data Bind DataGrid Component Without Scrolling Up?

Nov 28, 2009

I have a DataGrid component that I would like to update every 5 seconds. As rows are being added to this DataGrid I noticed that every update causes it to reset the scroll bar position to the top. How can I manage to keep the scroll bar at its previous position?

View 4 Replies

Flex :: Bind The Combobox Text The User Enters?

Aug 15, 2010

I have an editable combobox. How can I bind the text the user enters? I can only do binding when the user selects whatever it is they typed in...how can I bind it as they type?

View 1 Replies

Flex :: Have Image Bind To Bytearray Rather Than Bitmapasset Or Bitmap

Feb 15, 2011

I have an object that stores the compressed ByteArray version of an image (jpg or png). I want to keep it that way as the bytearray is about 30x smaller than the Bitmap it creates. The problem I run into is when I want to bind an image to this byte array. I can't really bind it to bytearray, because it requires a BitmapAsset as a source. Is there a way I can load a BitmapAsset from a bytearray but still bind to the bytearray when a new image is available?

View 1 Replies

Flex :: Unable To Bind Warning: Class Is Not An IEventDispatcher?

Apr 7, 2011

I am getting the error: warning: unable to bind to property 'Description' on class 'Object' (class is not an IEventDispatcher)

this is only when the data is bound to a List as an ArrayList, though. I had it in a Datagrid before (just as an Array) and it did not cause any issue. I'm not expecting to be able to bind any data back to the class 'object' not even sure which object exactly it's referring to.

My list data-provider is an ArrayList.. populated by a result event from an SQL query contained in another class:

private function loadDayComplete():void
{
var Meals:Array = _day.MealResults;

[Code].....

The day class I have is a data holder to get all the data (from several tables) for a 24 hour span.. I have classes for each individual datatype for editing them. But I'm not sure do I even need to worry about the warning if I don't plan on editing the values? it completely spams the console though whenever I touch anything, so I really would like to get rid of it. I tried an object proxy as I saw described elsewhere but nothing changed. The text is in label fields right now anyway, which can't even be edited.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved