• 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: Drop files on NSTextView and Controllers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drop files on NSTextView and Controllers


  • Subject: Re: Drop files on NSTextView and Controllers
  • From: Charilaos Skiadas <email@hidden>
  • Date: Wed, 9 Mar 2005 08:56:13 -0600

On Mar 9, 2005, at 5:37 AM, <email@hidden> wrote:

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't you simply have the view send a message to its delegate, and presumably the delegate would be the appropriate controller?


Can anyone lend me a hand and/or point me to a previous post? Much appreciated. Thanks.

James

Haris

_______________________________________________
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: 
 >Drop files on NSTextView and Controllers (From: <email@hidden>)

  • Prev by Date: Re: -[NSSet initWithSet:copyItems:] crashing
  • Next by Date: Re: SystemStatusBar question
  • Previous by thread: Drop files on NSTextView and Controllers
  • Next by thread: Forcing the mouse cursor position
  • Index(es):
    • Date
    • Thread