How can I delete multiple describetype entries in my database?
public static function bindProperty2(site:Object, prop:String, host:Object, chain:Object, commitOnly:Boolean = false):ChangeWatcher
{
var cbx:ComboBox = null;
if ( site is ComboBox ) { cbx = ComboBox(site); }
if ( host is ComboBox ) { cbx = ComboBox(host); }
var labelField:String = "listID";
var w:ChangeWatcher = ChangeWatcher.watch(host, chain, null, commitOnly);
if (w != null)
{
var func:Function;
if ( site is ComboBox )
{
func = function(event:*):void
{
var dp:ICollectionView = ICollectionView(site.dataProvider);
var selItem:Object = null;
for ( var i:int=0; i<dp.length; i++ )
{
var obj:Object = dp[i];
if ( obj.hasOwnProperty(labelField) )
{
var val:String = String(obj[labelField]);
if ( val == w.getValue() )
{
selItem = obj;
break;
}
}
}
site.selectedItem = selItem;
};
w.setHandler(func);
func(null);
}
else
{
func = function(event:*):void
{
var value:Object = w.getValue();
if ( value == null )
{
site[prop] = null;
}
else
{
site[prop] = String(w.getValue()[labelField]);
}
};
w.setHandler(func);
func(null);
}
}
return w;
}
Tags: apache-flex air actionscript-3
Source: By Matt MacLean as answer to the question
This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 3.0
Related code-snippets:
- How do I unload byteArray with ActionScript3?
- SQLStatement.execute() - multiple queries in one statement.
- How do you get the current logged in user in Adobe air from a desktop app?
- Is there any way to test flex application with a build script?
- How can you use a SQLite database at the same time?
- Actionscript 3 - Fastest way to parse yyyy-mm-dd hh:mm:ss to a Date object?
- Adobe Flex component events are created by elements of Adobe Flex events.
- Open local file with AIR Flex.
- How do I add non-dynamic actionscript 3 classes without inheriting the classes?
- What are some of the best ways to print flex components in FireFox3?
- How do I accept a drag in Flex?
- How do I replace A node in E4X (AS3 - Flex)?
- How do I restyle an Adobe Flex Accordion to include a button in each canvas header?
- Is programming data binding actually painless?
- How do I call a Flex SWF from a remote domain using Flash?