• 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: CustomView drag and drop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CustomView drag and drop


  • Subject: Re: CustomView drag and drop
  • From: "Andrew O. Mellinger" <email@hidden>
  • Date: Wed, 23 Jul 2003 08:00:39 -0700

Ive written the code for my NSView custom class to accept drops, read the file, get what Info from that file I need etc.... Here is where I get lost, how can I "send" my NSString that I have (which is the path to the file that was dropped) to my main window's NSTextField?

Other information, I can do this process if I use the window as the dropzone (completely doing away with CustomView) and reading the file and sending the file path to the NSTextField outlet. I would just really like to have a specific area as a dropzone for files. So I guess the actual question is how can I access a particular outlet to my main window from my subclass of NSView? or is there a different way I am suppose to be doing this?

The NSView subclass isn't supposed to know about the NSTextField. The NSView should post a notification to allow other people to know that it has some different information. The controller should look for that notification and when it gets the notification it should request the new path from the custom object and configure the NSTextField.

-Andrew
--
_______________________________________________
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.

  • Follow-Ups:
    • Re: CustomView drag and drop
      • From: Chris Long <email@hidden>
References: 
 >CustomView drag and drop (From: Chris Long <email@hidden>)

  • Prev by Date: Re: Bug reports and documentation updates
  • Next by Date: Re: Bug reports and documentation updates
  • Previous by thread: CustomView drag and drop
  • Next by thread: Re: CustomView drag and drop
  • Index(es):
    • Date
    • Thread