Re: NSView/NSTableView question
Re: NSView/NSTableView question
- Subject: Re: NSView/NSTableView question
- From: Robert Martin <email@hidden>
- Date: Sun, 5 Dec 2010 09:28:06 -0500
Another approach that might be simpler: Set up a tabbed view with 2 views - one to receive drops with all your instructions, and the other to display the table. Switch to the drop view when the table row count is 0, and switch back to the table tab when valid drops are registered.
On Dec 5, 2010, at 9:12 AM, Rick C. wrote:
> Hello,
>
> In my project I have a table view on the main window which accepts drops and the dropped files will show up as a list. All works normally at this point. However as an "afterthought" I was thinking to put an NSView on top with a graphic stating "Drop files here" or something to that effect so when the table view is empty the user doesn't have to stare at an empty table view. However I have run into a few issues and I was hoping someone could point me in the right direction or maybe let me know if I'm going about this wrong. Here are the issues I'm having:
>
> 1. Once a file is dropped onto my main window I'm trying to hide the NSView so the NSTableView will show through. It works but I'm having a difficult time to unhide the NSView when the table view goes back to empty
> 2. My table view is the data source since this part was already done. The table view is also the one receiving drops even when my custom view is visible. Is this wrong and do I have to make my custom view a data source too?
> 3. Since I have custom colors in my table view and now I'm setting the color in my custom view it creates some "artifacts" when dragging a file on my main window. I'm guessing there must be a conflict somewhere...
>
> Well again any pointers would be great. Much appreciated!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden