home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / DevTools / eText5 / Source / eTURLink.subproj / dragexperiment < prev    next >
Encoding:
Text File  |  1994-07-24  |  902 b   |  27 lines

  1.     [urlView registerForDraggedTypes:&NXAsciiPboardType num:1];
  2. //////////////////////////////////
  3. // Dragging Destination support!//    For those fine guys at OmniGroup :)
  4. //////////////////////////////////
  5. - (NXDragOperation)draggingEntered:(id <NXDraggingInfo>)sender
  6. {return [self draggingUpdated:sender];}
  7. - (NXDragOperation)draggingUpdated:(id <NXDraggingInfo>)sender
  8. {
  9.     if (sourceMask & NX_DragOperationLink) {
  10.         return NX_DragOperationLink;
  11.     } else if (sourceMask & NX_DragOperationCopy) {
  12.         return NX_DragOperationCopy;
  13.     } else if (sourceMask & NX_DragOperationGeneric) {
  14.         return NX_DragOperationGeneric;
  15.     }
  16.     return NX_DragOperationNone;
  17. }
  18. - prepareForDragOperation:sender{return YES;}
  19. - performDragOperation:sender
  20. {
  21.     id thePboard = [sender draggingPasteboard];    
  22.     [urlField setSel:0:0];
  23.     [urlField readSelectionFromPasteboard:thePboard];
  24.     return YES;
  25. }
  26. - concludeDragOperation:sender{return YES;}
  27.