• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
update a tableView from a different class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: update a tableView from a different class
      • From: Graham Cox <email@hidden>
    • Re: update a tableView from a different class
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: how can I copy from another app?
  • Next by Date: Re: L-shaped custom view in Cocoa?
  • Previous by thread: Re: how can I copy from another app?
  • Next by thread: Re: update a tableView from a different class
  • Index(es):
    • Date
    • Thread