• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextView Text Dragging Position
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView Text Dragging Position


  • Subject: Re: NSTextView Text Dragging Position
  • From: Satoshi Matsumoto <email@hidden>
  • Date: Fri, 14 Oct 2005 10:11:03 +0900

on 05.10.14 5:38 AM, Seth Willits at email@hidden wrote:
> Does anyone know how to determine the character positions that text
> was dropped onto an NSTextView? I need to manipulate the string and
> do my own custom insertion but I haven't yet figured out how to find
> the character position to insert the text at.

You can get the dragging location from  NSDraggingInfo.
For example,

- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{

    NSPoint draggingLocation = [sender draggingLocation];
    draggingLocation = [self convertPoint:draggingLocation fromView:nil];
    ......

}

Satoshi
-----------------------------------------------------
Satoshi Matsumoto
816-5 Odake, Odawara, Kanagawa, Japan 256-0802


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSTextView Text Dragging Position (From: Seth Willits <email@hidden>)

  • Prev by Date: Re: accessing the CFSteam that NSURLConnection is using?
  • Next by Date: Re: NSTextView Text Dragging Position (2)
  • Previous by thread: NSTextView Text Dragging Position
  • Next by thread: Re: NSTextView Text Dragging Position (2)
  • Index(es):
    • Date
    • Thread