I've searched the archives and have tried for the last few days
to get an Drag and drop NSBrowser to work. The drag source works,
but I can't get NSBrowser to become a drag destination. I've
subclassed NSMatrix, but I still can't get it to work to become a
drag destination.
//setup the browser view
// Make the browser user our custom browser cell.
[browser setCellClass: [FSBrowserCell class]];
// Make the browser user our custom browser cell.
[browser setCellClass: [FSBrowserCell class]];
//we need to intercept dragging events to subclass NSMatrix.
[browser setMatrixClass:[BrowserMatrix class]];
// Tell the browser to send us messages when it is clicked.
[browser setTarget: self];
// [browser setAction: @selector(browserSingleClick:)];
[browser setDoubleAction: @selector(browserDoubleClick:)];
// Configure the number of visible columns (default max visible
columns is 1).
[browser setMaxVisibleColumns: MAX_VISIBLE_COLUMNS];
[browser setMinColumnWidth: NSWidth([browser bounds])/(float)
MAX_VISIBLE_COLUMNS];
[browser setAllowsEmptySelection:YES];
// Prime the browser with an initial load of data.
[self updateUI];
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden