6 Replies Latest reply on Sep 18, 2008 8:16 PM by VineetBansal

    How to specify dragdrop function for a dynamically added List ?

      I'm dynamically attaching a List component to a Canvas component and want the List to be able to accept items from other Lists as droppables. Due to the nature of my application, I HAVE to create the List at runtime and cannot create it in mxml (since there are an unspecified number of such lists that's known only at runtime). My problem is that I can't seem to find a way to attach a custom dragDrop function to such a dynamically added list (I need such a function for error checking). I am attaching code for a stripped down version of my problem here.

      In this example, from the list at the bottom, I can drag elements to the first Canvas and have my custom function executed but how would I do the same for the second Canvas? Flex Builder won't allow me to specify the 'dragDrop' property of the List object. (My guess is that I might have to typecast it as some other object? I'm not sure.)

      Thanks much in advance!!