Drag and Drop Messages



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

    On 24/07/2003 at 03:45, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.100 
    Platform:      
    Language(s) :   C.O.F.F.E.E  ;

    ---------
    Hiya
    I have searched the forum and used the same exact code that I have found, yet it doesn't work.
    the code I looked at says to do this..

        
        
        
        
        oDialog::Message(msg)  
        {  
         if(msg->GetId() == BFM_DRAGRECEIVE)
        
        
        
        
        ..
        
        
        
    

    but console quickly gets filled up with member not found errors on the if statement. It seems the msg doesn't have a GetID() member.
    The COFFEE SDK on the other hand says to do something like this

        
        
        
        
        oDialog::Message(msg)  
        {  
          if (msg->GetData(BFM_DRAG_FINISHED))  
          {  
                if (CheckDropArea(DRAG_TEST, msg))  
                {  
                  var obj = GetDragObject(msg);  
                  var result = new(BaseContainer, BFM_DRAGRESULT);  
                  result->SetData(BFM_DRAGRESULT_CURSOR, MOUSE_POINT_HAND);  
                  return result;  
                }
        
        
        
        
          }  
          return super::Message(msg);  
        }
        
        
        
    

    but that errors on line var result = new(BaseContainer, BFM_DRAGRESULT); with 'Variable or Function expected'
     
    What am i doing wrong? which way is correct?



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

    On 24/07/2003 at 06:05, xxxxxxxx wrote:

    Where are you calling this from? I won´t run my code a fourth time here so please do search the forum once again. There is a working code available.
    Best
    Samir



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

    On 24/07/2003 at 14:45, xxxxxxxx wrote:

    Thanks, i didnt see your complete drag plugin code on my previous search. Just tried it and it worked. Thanks
    Still don't see what I did wrong though, but i will disect it to work it out



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

    On 24/07/2003 at 15:41, xxxxxxxx wrote:

    Still don't see what I did wrong though, but i will disect it to work it out
    Also if it sounds arrogant but that´s a good exercise to get into COFFEE. Without obstacles or problems, it would take longer to learn it than without them.



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

    On 25/07/2003 at 11:22, xxxxxxxx wrote:

    And please report your results... :-)



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

    On 25/07/2003 at 16:22, xxxxxxxx wrote:

    I found out what it was. It was a silly amatuer mistake. Wrong case-sensitivity
    My code was

        
        
        
        
        oDialog::Message(msg)  
        {
        
        
        
        
          if(msg->GetID() == BFM_DRAGRECEIVE)  
          {  
          }
        
        
        
        
        }
        
        
        
    

    ->GetID() should have been ->GetId()
    silly me


Log in to reply