CustomView drag and drop
CustomView drag and drop
- Subject: CustomView drag and drop
- From: Chris Long <email@hidden>
- Date: Wed, 23 Jul 2003 17:22:41 +0900
Been trying to figure this out for quite some time, would love any help
with this. Please pardon any of my word usage, im quite a beginner.
What I am trying to do is drag and drop a file/folder/etc... only on to
a specific area (the customview) and then have it write the path to
that file to the text field. The problem, as far as I can see, lies in
my implementation of my CustomView.
I have a window with an NSTextField and a CustomView, Ive subclassed
NSView and set it as a custom class for my CustomView. Ive subclasses
NSObject as my "window controller" and set the outlets for the text
view properly. Created my files for both classes.
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?
Thank in advance,
Chris
_______________________________________________
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.