Re: drag and drop: NSView vs. NSImageView
Re: drag and drop: NSView vs. NSImageView
- Subject: Re: drag and drop: NSView vs. NSImageView
- From: Ryan Bates <email@hidden>
- Date: Fri, 5 Mar 2004 09:42:21 -0800
Apple has some sample code that demonstrates dragging/dropping from/to
an NSImageView subclass:
<
http://developer.apple.com/samplecode/Sample_Code/Cocoa/
CocoaDragAndDrop.htm>
The subclass overrides "initWithCoder:" - anyone know why they chose
that over "awakeFromNib"?
Ryan
On Mar 5, 2004, at 7:27 AM, Michael Becker wrote:
Hi!
In order to enable drag and drop, I subclassed NSView. Everything
worked nicely. But because I need to display an image in my view, I
changed it to be a subclass of NSImageView instead of NSView. Now the
drag and drop doesn't work anymore. Even my initWithFrame: method
doesn't get called.
The only thing I changed was this:
before:
#interface PCFolderDrop : NSView {
after:
#interface PCFolderDrop : NSImageView {
And of course I changed the NIB. (I deleted the old NSView, put in an
NSImageView, then configured it to be of the custom class
PCFolderDrop).
What am I missing here?
Bye,
Michael
_______________________________________________
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.
_______________________________________________
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.