awakeFromNib & registerForDraggedTypes_ question

I have a trash can in my project that when you drop an item on it, it will send that item to the trash, works great.

when I compile the application I keep getting this error, yet it doesn’t effect anything.

Is there any thing I can do to get rid of this error?, an alternative to the awakeFromNib maybe.

[DROPTRASH awakeFromNib]: mainTrashWindow of «script» doesn’t understand the “registerForDraggedTypes_” message. (error -1708)

Is this a recent project? Can you check whether Prefer coder is checked for the nib?

thanks for replying Shane

The project has been growing since it’s inception back in 2008, I have
upgraded the versions of Xcode and adapted over the years to keep as current
as possible, this latest build is using Xcode 7.2 on OS X 10.11.3.

The “Prefer coder” check box was unchecked, I checked it and did another build
the issue still remains.

The area used to drop the item onto is a custom class linked with a outlet.

I have seven errors thrown when I do a build and they all come from the same sort of set up
used for drag and drop in different parts of my app, apart from that no other errors show at build time.

Find where you call registerForDraggedTypes_, and insert this before it:

current application's NSLog("mainTrashWindow is %@", mainTrashWindow)

Then see what gets logged.

2016-01-26 15:21:01.852 BLACK MASK[55359:3442785] mainTrashWindow is (null)
2016-01-26 15:21:01.852 BLACK MASK[55359:3442785] *** -[DROPTRASH awakeFromNib]: mainTrashWindow of «script» doesn't understand the "registerForDraggedTypes_" message. (error -1708)
2016-01-26 15:21:01.854 BLACK MASK[55359:3442785] mainTrashWindow is <DROPTRASH @0x100110910: OSAID(336) ComponentInstance(0x810000)>

Check that mainTrashWindow is connected to what you think it is in Xcode. That doesn’t look right to me.

ok, did that and all is connected as it should be, BUT!
what I did find though is, when I right clicked on the blue cube “DROP TRASH”
the outlet mainTrashWindow" is definitely connected to the box it is supposed to
be connected to, but if I click on the “Show the Connections Inspector” top right
the "mainTrashWindow " doesn’t show as being connected, if I connect it also from there
and build the error goes away, this odd behaviour

Forgot to add, that even though it compiles, and the error goes away, the drag and drop stops working.

back to the drawing board

went back and made new box’s an hooked them all up, drag and drop still works fine, but i’m still
getting the same errors thrown in the log.

I guess as long as it’s working and it doesn’t appear to be failing any where i’ll have to live with this.

thanks Shane for your input.