Drag and Drop file paths onto text field
Drag and Drop file paths onto text field
- Subject: Drag and Drop file paths onto text field
- From: John Hansen <email@hidden>
- Date: Mon, 08 Jul 2002 16:45:58 -0700
I am trying to drag and drop files onto a subclass of NSTextView and put the
path name of the file as the string value of the text field. Everything
works quite well except for where the mouse must be to perform a successful
drag. It seems that drag and drop only works when the mouse is held on the
border of the text cell.
I put in protocol methods draggingEntered and draggingExited and found a
very strange behavior. The draggingEntered routine gets called when the
mouse is on the border of the text cell. The draggingExitted routine gets
called as I enter the interior of the text cell. It is as if the view
rectangle of the text field consists of a one pixel border around the
interior of the cell. Does anyone know why this is happening? Does it have
something to do with the mouse location that Text fields do so they can show
the I-beam cursor?
John Hansen
Symantec
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.