Re: NSTableView drag and drop too smart for its own good
Re: NSTableView drag and drop too smart for its own good
- Subject: Re: NSTableView drag and drop too smart for its own good
- From: Jerry Krinock <email@hidden>
- Date: Wed, 13 Sep 2006 13:05:10 -0700
- Thread-topic: NSTableView drag and drop too smart for its own good
on 06/09/13 9:57, Paul Kim at email@hidden wrote:
> I have two table views, one is a source list and....
If all of what you say is true, I'd say this is unfortunate. I would have
expected it to call -validateDrop
> Is there an easy way to work around this or am I stuck re-
> implementing NSTableView's drag and drop in a subclass to get this to
> work?
Oooooo, I'd suspect there is some other trick that would be much easier than
re-implementing drag and drop in a subclass. How about this:
newTableView = [originalTableView copy] ;
// Make sure the above is a deep copy that
// copies all instance variables
[originalTableView retain] ;
[originalTableView removeFromSuperview] ;
[newTableView reloadData] ; // (gets new data)
[windowContentView addSubview:newTableView] ;
Then, after you've completed the drop,
[originalTableView release] ;
_______________________________________________
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