Drop files on NSTextView and Controllers
Drop files on NSTextView and Controllers
- Subject: Drop files on NSTextView and Controllers
- From: <email@hidden>
- Date: Wed, 9 Mar 2005 11:37:48 +0000
First off, when I say Controllers, I don't mean NSObject/ArrayController, just ordinary NSObject subclasses as a controller type object.
This is what I want to do. Drag a file or files onto an NSTextView and insert their pathnames into the NSTextView. Now I also need to set the array of filenames from the dragOperation (as I've seen from the docs when you have a group of files it creates an NSArray of NSStrings, which is absolutely PERFECT as I use the same in my app). However, this is the snag...
I have three different views, all with their own NSTextView (this is in a tabbed interface, BTW). I've subclassed NSTextView, I've read the docs on how to set them to receive drag operations and all of that, and I've set each of my NSTextViews Custom Class to my NSTextView subclass. That's all fine and dandy.
But each of these NSTextView's are declared in their own controller class and what I need to be able to do is to get the NSArray of NSStrings the dragOperation provides and set it as one of my instance variables in said controller class.
Can anyone lend me a hand and/or point me to a previous post? Much appreciated. Thanks.
James
_______________________________________________
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