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

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.


References: 
 >drag and drop: NSView vs. NSImageView (From: Michael Becker <email@hidden>)

  • Prev by Date: Re: small or mini NSSegmentedControl in textured windows
  • Next by Date: Re: OS X 10.3.x, Address Book, and initWithVCardRepresentation
  • Previous by thread: Re: drag and drop: NSView vs. NSImageView
  • Next by thread: Passing C Style Function Callbacks in Cocoa
  • Index(es):
    • Date
    • Thread