nstableview

How to auto-select next row after deleting current row by core data context?

I am using Core Data to manage objects and using a NSTableView to display those objects. The table columns are binded to objects' properties through a NSArrayController. When users click the delete button, all selected objects in the NSTableView will be deleted. Then only remained objects are left in the NSTableView. This works smoothl...

Can i separate the selection model from an NSTableView

Is there any way how i can maintain my own data model of selected items in a NSTableView. I find it either pretty slow or complicated to keep the state of selected items when i update the table model. ...

Application crash when user is making edits to a table view and data gets refreshed in it.

Hi all, In my application I have taken certain table views, their data gets refreshed in background thread if a user makes and save changes. Problem is- when user is making some edit to a table row and its data gets refreshed in background, due to changes done by some other user, then the application crashes. Can anyone...

Updating a NSTableView data source from a background thread.

What is the best way to synchronize a data source which is updated frequently from a background thread with the GUI main thread? Should i put a pthread mutex around each method call? This seems to be pretty heavy too me. EDIT: I'm looking for a 10.5 solution ...

-initWithFrame method is being called twice

Hi, I have written a code to load a nib file which consists of a view and a tableview. Everything works fine as expected but when i run the program, sometimes the views gets loaded, sometimes it doesnot. I mean, when i run my application say for the first time, it will open a proper GUI window with all the views in place. when i re-open ...

iPhone app crashes when comparing cell.textlabel.text to a string

This is a little side project I'm working on for fun. I begin by initializing with - (void)viewDidLoad { [super viewDidLoad]; rootArray = [[NSMutableArray alloc] initWithObjects:@"Earth",@"Mars",@"Pluto",nil]; moonArray = [[NSMutableArray alloc] initWithObjects:@"Clavius",@"Galileo",@"Ptolamy",nil]; marsArray = [[NSMutableArray al...

Change NSTableView alternate row colors

I'm using the "Alternating Rows" option in Interface Builder to get alternating row colors on an NSTableView. Is there any way to change the colors of the alternating rows? ...

How to update NSTableView without using -reloadData?

I am new to the Mac. I am trying to update a particular cell in NSTableView without using -reloadData, as -reloadData updates the whole table. I have tried everything but all was in vain. I am trying to do something similar to what we used to do in CListCtrl in MFC or in .NET. ...

NSTableView Issues...

I'm trying to follow this tutorial on binding: http://andrehoffmann.wordpress.com/2009/09/03/phonebook-tutorial-for-dummiesxcode-3-1-3/ but the app keeps crashing at run time. In IB I have a NSBUtton, NSTableView, NSArrayController and a NSOBject (named AppController) The tableview has 3 cols. Ad Name, Col and Height. In AppContro...

How to change an NSTableView's selection without using deprecated methods

I have the Apress "Learn Cocoa" book (published in 2010 BTW) and I am getting a deprecation error on one of the lines. The code is: - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { self.villain = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"Lex Luthor", kName, @"Smallville", kLastKnownLocation, [NSDa...

Getting data from selected row in NSTableView linked with Core Data

Hey, So i am working on a Core Data app and I have an NSTableView linked with the Core Data. The table has three columns. Name, Position, Salary. I also set up a double click action. now what I need is that when I double click on a row i get the three values of that row. I can do the following: NSArray* myArray = [arrayController select...

Using an NSTableView as a grid, possibly with vertical labels?

I want to display a grid of data, with long header names for the columns and long header names for the rows, but just a small amount of data in the cells, and I would like to do so in a compact manner, something sort of like this: V V V V V V H H H H H H e e e e e e ...

[Objective-C "Bindings"] How to refresh an NSTableVIew when you populate the NSMutableArray (bind) associated with it .

Hello there I just want to ask that I tried to bind my NSArraycontroller to an NSMutableArray, the array holds objects of type "iData" (its a custom class). The class further contains some NSMutableString variables, the variables are set as keys for KVC. Further i bind the my NSTableColumn to the NSArrayController and set key model paths...