Re: Detecting a paste operation in NSTextView
Re: Detecting a paste operation in NSTextView
- Subject: Re: Detecting a paste operation in NSTextView
- From: Jeremy Dronfield <email@hidden>
- Date: Mon, 29 Mar 2004 21:59:12 +0100
Douglas gallops to the rescue again! I've implemented it like so:
- (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard
type:(NSString *)type
{
[self setIsPasteOperation:YES];
return [super readSelectionFromPasteboard:pboard type:type];
}
Works beautifully. Thanks loads.
-Jeremy
===================================
SkoobySoft, home of viJournal
email: email@hidden or visit:
http://freespace.virgin.net/jeremy.dronfield/skoobysoft.html
===================================
On 29 Mar 2004, at 7:38 pm, Douglas Davidson wrote:
You can subclass NSTextView and override
readSelectionFromPasteboard:type:. That would catch paste, paste as
rich/plain text, drag and drop of text, dragging in of files, pasting
rulers, etc. Alternatively, you could override insertText:, which is
the funnel point for insertion by typing.
Douglas Davidson
_______________________________________________
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.