Re: NSTableView reloadData from two sources?
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... :-)
From: I. Savant <idiotsavant2005@xxxxxxxxx>
To: Jo Phils <jo_phls@xxxxxxxxx>
Cc: cocoa dev <cocoa-dev@xxxxxxxxxxxxxxx>
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 <jo_phls@xxxxxxxxx> 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?
Cocoa-dev mailing list (Cocoa-dev@xxxxxxxxxxxxxxx)
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 maillists@xxxxxxxxx