Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-28981

Automation Drag / Drop DragSource object doesn't contain added items

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 4.5.1 (Release)
    • None
    • Drag and Drop
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows 7
      Browser: Firefox 3.x
      Language Found: English

    Description

      Steps to reproduce:
      Create an Air application with two Advanced datagrids (ADG1 and ADG 2)

      1 Add eventlistner drag_Start to ADG1. In this handler fill the datasource and start drag:

      var xPath:String = (grid1.selectedItem as TreeData).label;

      var dragSource:DragSource = new DragSource();
      dragSource.addData(xPath, PROPERTY_XPATH);
      dragSource.addData(grid1.selectedItem,"selectedItem");

      DragManager.doDrag(UIComponent(grid1), dragSource, event);

      2. Create an eventlistener drag_Drop to ADG 2. In this handler you will use the data of the DataSource object to add the draggeditem to ADG2 :

      var xPath:String = event.dragSource.dataForFormat(PROPERTY_XPATH) as String;
      (grid2.dataProvider as ArrayCollection).addItem(event.dragSource.dataForFormat("selectedItem"));

      So far so good this works beautifull real time but when using automation the datasource object doesn't contain the items added in drag_start of (Adg1).

      We are using Riatest for recording. The script look like this :

      FlexAdvancedDataGrid("grid1")=>dragStart("Company 4 | | ");
      FlexAdvancedDataGrid("grid2")=>dragDrop("copy");

      I noticed when replaying that the DataSource object is constructed form event.ClipBoard.formats. This is in the NativeDragManagerImpl.as. But as you will guess event.ClipBoard.Formats doesn't contain the items added in the drag_Start handler of ADG1. In this case it only contains: [0] "items",[1] itemsByIndex and [2] "caretIndex"

      Please provide us any help because we haven't got a clue what to do next. Or does the Flex automation framework doesn't support dragSource at all? Just default drag drop operations without using DragSource object works ok .

      please also take a look at the application attached. Record the drag drop operation and replay this script. You will see DragEvent.DragSource doesn't match the information added to this object .

      Looking forward to hear from you !

      Kind regards

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: