0 Replies Latest reply on Jan 31, 2011 3:55 AM by ThePrax

    Drag and Drop - WebApp to Air

    ThePrax

      Hello,

      i got the following problem with my Adobe Web/Air application.

       

      I´ve build a Web-Flex application with six list elements. The first list contains all orders to plan into the other five list elements (mo-fr).

      You can take a order (e.g. "324421424") and drag it into a daylist. But if a order is already planned, the user shouldnt be able to move that order.

       

      Im using the following to call the dragDrop - Eventhandler

       


      <mx:List
      iconFunction="setIcon"
      labelField="label"
      iconField="icon"
      dataProvider="{HS5AlreadyPlannedShopOrderLists.getItemAt(5)}"
      doubleClick="doubleClickHandler(event)"

       

      dragDrop="dragDropHandler(event)"

       

      dragMoveEnabled="true"
      dragEnabled="true"
      dropEnabled="true"
      width="143"
      height="316"
      borderStyle="none"
      id="list_5"
      fontSize="13"
      fontWeight="bold"
      x="0"
      y="24"
      fontFamily="Verdana"
      backgroundColor="#F4F4F4">
      </mx:List>

       

      In dragDropHandler() i check if the order is already planned and than i abbort the drag-event with

       


      event.preventDefault();
      event.target.hideDropFeedback(event);                   
      DragManager.showFeedback(DragManager.NONE);

       

       

      That works fine in my Webapplication, but after converting to Air application it just hide my order.

       

      It seems to be "event.preventDefault();" because if i take it away it works, but the dragevent will not be aborted.

       

      Im using Adobe Flashbuilder 4, Flex SDK3.2, Mate-Framework and the SAP Touchscreen UI Library.

       

       

      I hope someone can help.

       

       

      Thanks

       

       

      Sascha Köhler