update a tableView from a different class
update a tableView from a different class
- Subject: update a tableView from a different class
- From: Martin Batholdy <email@hidden>
- Date: Thu, 05 May 2011 02:52:32 +0200
Hi,
I have a singleton class which manages a tableView.
In the UI everything works fine. I can delete entries, edit entries and the table gets updated properly.
Now I have another class which manages the entries of a dropdown menu.
Now when an item of this dropdown menu is getting pressed I want to change something in my tableView – so the table should get updated.
So the singleton class that manages my tableview has a method "- (void)updateView":
- (void)updateView {
[content removeObjectAtIndex:1];
[table reloadData];
[table deselectAll:self];
}
and when the menuitem is pressed the following is invoked (in a different class):
prefShow = [Preferences sharedPrefsWindowController]; ( <- this is my singleton)
[prefShow updateView];
Everything works fine – the updateView method is called and the NSMutableArray (content) is also updated properly.
However nothing changes in the table.
[table reloadData] seems to have no effect.
But why?
It works for other methods that are linked to IBOutlets..._______________________________________________
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