Hello List,
I am having an issue with attaching a "change" handler to a ComboBox
that is being dynamically generated. What is wrong with this code I am
using?
var myComboBox =
myScrollBox.createClassChildAtDepth(mx.controls.ComboBox,
DepthManager.kTop, {_x:10, _y:10});
myComboBox.addItem({label:"Foo", data:"FooBar"});
function comboDisplay(component) {
trace(myComboBox.getSelectedItem().data);
}
myComboBox.setChangeHandler("comboDisplay");
As a test, I tried:
myComboBox.onPress = function() {
trace(myComboBox.getSelectedItem().data);
}
... and it did trace the first item, but of course it wouldn't work as
a dropdown anymore.
Thanks.
--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com