Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
I am using Obj C with Cocoa Framework.
I am using NSTableView in my application. I have bind the columns to an array controller. But initially when ever I am adding objects to the array controller it's not updating the table view. When I close the window and click the icon in the dock, it will open the window as well as window is refreshed will the details. Why is it happening like that. How can I call manual refresh of the window. I tried using NSWindow's "update" as well as NSApplication's "updateWindows" but getting error that selector was not recognized.
Please help me in sorting out this problem.
 
When it's bound it should refresh automatically. When you're not using KVC for refreshing the data, you'll have to let the NSTableView know that the NSArrayController is refreshing it's data. You can do so with:

Code:
[self willChangeValueForKey:@"keyname"];
//Update code
[self didChangeValueForKey:@"keyname"];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.