Can't detect Drag finish



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/04/2003 at 09:17, xxxxxxxx wrote:

    Oh, just another thing, Samir. Your plug-in "Drag" does work and I could also do that before. What I was trying to do was to only accept the dragged object if the mouse was released inside a specific gadget. If the mouse was moved away, the dragged object would just be ignored (the gadget would keep the old value or become empty, whatever).
    With your code (and mine), as soon as a dragged object enters the gadget, it is accepted.
    That's why I was trying to check BFM_DRAG_FINISHED. But I always get nil as a result. Isn't there a way to make it behave the way I was intending?

    Rui Batista



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/04/2003 at 09:42, xxxxxxxx wrote:

    Works fine for me. Change the code I gave you to this and use obj as final object:
    var obj,temp;
    MyDialog::Message(msg)
    {
     if(msg->GetId() == BFM_DRAGRECEIVE) 
     {
      if(CheckDropArea(DRAG_TEST, msg, TRUE, TRUE))
      {
       temp = GetDragObject(msg);
       SetDragDestination(MOUSE_POINT_HAND);
       SetString(DRAG_TEST, temp->GetName());
       if(msg->GetData(BFM_DRAG_FINISHED))
       { 
          obj= GetDragObject(msg);
          SetString(DRAG_TEST, obj->GetName());
        
       }
       return TRUE;
       
      }
      else SetString(DRAG_TEST, "");
     }
     return super::Message(msg);
    }



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 09/03/2005 at 08:09, xxxxxxxx wrote:

    It's really to bad, that there never was an answer to the BFM_DRAG_FINISHED.

    This should trigger, when an object is dropped:

      
    if ( msg->GetData( BFM_DRAG_FINISHED ) )  
    {  
    println( "Drag Finished" );  
    }  
    

    It doesn't :(

    Weird it seems that the SDK 9.1 advice to use this, and it never triggers !?!

    If anybody know the solution to this, please post :)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 13/03/2005 at 17:07, xxxxxxxx wrote:

    Thanks to a a PM I got from Rui, this is needed to detect a drag finished.

    If a

    CheckDropArea()
    

    returns TRUE, you can use

      
    if ( msg->GetData( BFM_DRAG_FINISHED ) )  
    {  
    // Your code here  
    }  
    

    This should have been mentioned in the C.O.F.F.E.E. SDK.


Log in to reply