code_junkie

How do I get rid of the “multiple describeType entries” warning?

Nov 10th, 2011
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. warning: multiple describeType entries for 'selectedItem' on type 'mx.controls::ComboBox':<accessor name="selectedItem" access="readwrite" type="Object" declaredBy="mx.controls::ComboBase"> <metadata name="Bindable"> <arg key="" value="valueCommit"/> </metadata> ...
  2.  
  3. public static function bindProperty2(site:Object, prop:String, host:Object, chain:Object, commitOnly:Boolean = false):ChangeWatcher
  4. {
  5. var cbx:ComboBox = null;
  6. if ( site is ComboBox ) { cbx = ComboBox(site); }
  7. if ( host is ComboBox ) { cbx = ComboBox(host); }
  8. var labelField:String = "listID";
  9.  
  10. var w:ChangeWatcher = ChangeWatcher.watch(host, chain, null, commitOnly);
  11.  
  12. if (w != null)
  13. {
  14. var func:Function;
  15.  
  16. if ( site is ComboBox )
  17. {
  18. func = function(event:*):void
  19. {
  20. var dp:ICollectionView = ICollectionView(site.dataProvider);
  21. var selItem:Object = null;
  22.  
  23. for ( var i:int=0; i<dp.length; i++ )
  24. {
  25. var obj:Object = dp[i];
  26. if ( obj.hasOwnProperty(labelField) )
  27. {
  28. var val:String = String(obj[labelField]);
  29. if ( val == w.getValue() )
  30. {
  31. selItem = obj;
  32. break;
  33. }
  34. }
  35. }
  36.  
  37. site.selectedItem = selItem;
  38. };
  39.  
  40. w.setHandler(func);
  41. func(null);
  42. }
  43. else
  44. {
  45. func = function(event:*):void
  46. {
  47. var value:Object = w.getValue();
  48. if ( value == null )
  49. {
  50. site[prop] = null;
  51. }
  52. else
  53. {
  54. site[prop] = String(w.getValue()[labelField]);
  55. }
  56. };
  57. w.setHandler(func);
  58. func(null);
  59. }
  60. }
  61.  
  62. return w;
  63. }
Add Comment
Please, Sign In to add comment