0

I'm working on an OSC document based app. I have a "static" NSTableView in a xib file associated to my document. The table view is bound with a NSObject class that is initialized when I create an OSC connection (so there's no "didLoadNib" method inside). Everything seems to work right : mu connection is OK, the NSTableView displays well, but the class doesn't pass by the

- (id) tableView:(NSTableView*)tableView objectValueForTableColumn:(NSTableColumn*)tableColumn row:(NSInteger)row

and the NSTableView remains empty, even when I change my instantiated class values, and the NSMutableArray bound with the NSTableView It seems to work only when I make a [[myTableView alloc] init] in my

- (void)windowControllerDidLoadNib:(NSWindowController *)aController

(but without displaying anything, it only see that I have the right number of rows, it doesn't pass by the previous method) Hope that is a bit clear... Does anyone has an idea. Thanks a lot in advance.

Ben

Benoît Lahoz
  • 1,270
  • 1
  • 18
  • 43
  • What's OSC? You say "bound" – are you using bindings? With bindings, `-objectValueForTableColumn` will not be called – that's a data source method. – paulmelnikow May 24 '12 at 18:34
  • OSC is Open Sound Control, a transmission protocol (http://opensoundcontrol.org/introduction-osc). I wish to record OSC messages and display them in an NSTableView. Sorry for my bad explanation, I'm using data source (my "connection" object that receives messages). What I meant is that my NSTableView is not created programmatically. Thanks for your answer. – Benoît Lahoz May 25 '12 at 15:41
  • I see. How about `-numberOfRowsInTableView` – is that being called? – paulmelnikow May 25 '12 at 15:44
  • Yes but only once, when I create the "connection" instance, it doesn't have any messages yet and counts 0. – Benoît Lahoz May 25 '12 at 16:14
  • Try calling `-reloadData` on the table view after you insert the content. – paulmelnikow May 26 '12 at 14:43
  • Yes, I did it, but no way... In the console I have a "triggered dyld region unnest for map" message everytime I connect to my input port on the OSC connection. Don't know if it can be related... – Benoît Lahoz May 26 '12 at 15:38
  • If `-reloadData` doesn't cause `-numberOfRowsInTableView` to be called again, the table view isn't connected to the data source. I doubt the other message is related. – paulmelnikow May 26 '12 at 15:44
  • I'm asking myself if the fact that I have a toolbar loaded in the main Document.m, before my Connection instance that is the datasource of the table is important. I will try bindings and connecting in the main document. – Benoît Lahoz May 27 '12 at 10:50
  • OK, my bindings in IB weren't good at all.Thanks @noa for your comments and help. – Benoît Lahoz Jun 08 '12 at 10:08

0 Answers0