NSTableView Drag and Drop with Bindings
NSTableView Drag and Drop with Bindings
- Subject: NSTableView Drag and Drop with Bindings
- From: Mike Solomon <email@hidden>
- Date: Wed, 22 Dec 2004 03:11:00 -0800
Hi all. I saw a conversation a couple of weeks earlier about using a
NSArrayController subclass as a dataSource to get drag and drop support
in an NSTableView.
I too get the following message:
2004-12-22 02:40:42.216 ******[27415] *** Illegal NSTableView data
source (<DTArrayController: 0x19221a0>[object class: NSString, number
of selected objects: 1]). Must implement numberOfRowsInTableView: and
tableView:objectValueForTableColumn:row:
(DTArrayController is a subclass of NSArrayController)
Now, the code basically works. The binding specified in the nib read
the correct data and the rows/columns are filled out correctly. I can
drag data into the table view and the appropriate code is called and
additions to the bound array are reflected in the UI.
As far as I can tell, everything is working correctly, yet I get this
message on the Console. The most unbelievable part is that I have
another table view in the same application that is working fine - no
error message. Clearly these messages don't need to be implemented. I
actually tried implementing them, to see if it was just a false alarm,
but implementing those messages prevents the data from the bindings
from showing up in the table.
Obviously, if I disconnect the dataSource in the nib, the error message
goes away, but so does drag and drop. The other instance works
perfectly fine. Maybe the haze of 3am is setting in, but I am
completely stumped.
The sample app Bookmarks from
http://homepage.mac.com/mmalc/CocoaExamples/controllers.html seems to
be doing the same thing, but after a quick download and compile, it
does not produce this error message...
Am I missing something completely obvious? Is this message safe to
ignore?
Any help would be most appreciated. Thanks all.
-Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden