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

mdeh

macrumors 6502
Original poster
Jan 3, 2009
345
2
I set up a NSTableView to play with. (for the drag etc). Added a NSMutArray as the "model" for a list of random words, which filled in the init method. To my surprise, the table fills when the app starts up. I looked at the docs and can find nothing about that,....but I suppose it makes sense. Why would you attach a list of objects as the datasource for a table if you did not want that table filled when you launched the app? The seems to be a whole host of calls in the the call stack that seems to trigger the "numberOfRowsInTableView". See below.

Is this expected behaviour...under the circumstances?



#0 0x10000135b in -[MyDocument(dataSource) numberOfRowsInTableView:] at TableViewDataSource.m:16
#1 0x7fff86575c8c in -[NSTableView numberOfRows]
#2 0x7fff86509624 in -[NSTableView _totalHeightOfTableView]
#3 0x7fff865095e9 in -[NSTableView _minimumFrameSize]
#4 0x7fff8650bba6 in -[NSTableView tile]
#5 0x7fff86513d61 in -[NSTableView rowsInRect:]
#6 0x7fff8652885f in -[NSTableView _dirtyVisibleCellsForKeyStateChange]
#7 0x7fff86528574 in -[NSTableView _windowChangedKeyState]
#8 0x7fff862dfffe in CFArrayApplyFunction
#9 0x7fff8646fb01 in -[NSView _windowChangedKeyState]

Thanks in advance.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.