Problem with multiple NSTableViews
Problem with multiple NSTableViews
- Subject: Problem with multiple NSTableViews
- From: Mark Dawson <email@hidden>
- Date: Sat, 18 Jun 2005 16:33:31 -0700
I've have put two NSTableViews into one view, but only one of them is active/being called.
In my
- (int)numberOfRowsInTableView:(NSTableView *)tableView
{
if (tableView == (NSTableView *)oLevelTable)
{
return [mLevels numLevels];
}
else if (tableView == (NSTableView *)oLayerTable)
{
return [mLevels numLayersForCurLevel];
}
return 0; // nothing matched
}
controller code, "tableView" always matches "oLayerTable" the outlet for the 2nd NSTableView. Before I added the 2nd table view, the above code was always matching the 1st table view (oLevelTable). "oLevelTable" (the original table view) HAS a value (and a "isa" type of "NSTableView"), in IB my controller is hooked up to it, so I assume its connected up correctly. Note that my 2nd NSTsbleView seems to work just fine (as did the original, when it was the only one). I was expecting two sets of calls into numberOfRowsInTableView--one for my 1st NSTableView, one for my 2nd. Is there anything special I need to do to have 2 NSTableViews in the same panel?
Thanks,
mark _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden