Re: NSTableView reloadData from two sources?
Re: NSTableView reloadData from two sources?
- Subject: Re: NSTableView reloadData from two sources?
- From: Jo Phils <email@hidden>
- Date: Thu, 26 Mar 2009 09:34:55 -0700 (PDT)
Hi and thank you for your reply. Well it might not be the best design but after my receiving my drag and initializing my array in the DropView class at that point I thought I could tell my TableView to update. But since all the methods and connections to my TableView are in my Controller class I couldn't figure out how to do it. I was also able to write my own method in my Controller class that includes the reloadData message and call it from my DropView class and it works but only if I make my Controller class a IBOutlet of my DropView class (maybe that's bad?). Thing is it's no problem to have my TableView updated from my Controller class using a IBAction such as a button click but I wanted it to happen automatically as soon as my array was set and that's why I was trying to do it in my DropView class. Thank you and I hope that makes sense because I'm still learning... :-)
Rick
________________________________
From: I. Savant <email@hidden>
To: Jo Phils <email@hidden>
Cc: cocoa dev <email@hidden>
Sent: Thursday, March 26, 2009 11:57:30 PM
Subject: Re: NSTableView reloadData from two sources?
On Thu, Mar 26, 2009 at 11:53 AM, Jo Phils <email@hidden> wrote:
> My question is it's easy to send a reloadData message to my TableView from my Controller class since it's connected but how can I send a reloadData message to my TableView from my DropView class if needed?
You shouldn't. Your controller should be the one to recognize when
the table needs a reload and do the reloading.
You say, "if needed" ... why do you feel this is needed?
--
I.S.
_______________________________________________
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