Within my Mac app I've setup two NSSplitViews to create a Mail-style interface (with the first ScrollView used to create a vertical separator, and the second nested within the first, to create the horizontal separator). To illustrate the interface, I've created the following diagram:
To illustrate the setup further, here's an annotated snap of my view hierarchy:
The issue I'm having is that, when trying to grab the frames of two NSTableView's hosted within portion B and C of my NSSplitView, I receive relative coordinates. Here's the code I'm using:
NSRect aTableViewFrame = [aTableView frame];
NSRect bTableViewFrame = [bTableView frame];
NSLog(@"%@ %@", NSStringFromRect(aTableViewFrame), NSStringFromRect(aTableViewFrame));
Here's the output I see:
{{0, 0}, {760, 143}} {{0, 0}, {760, 392}}
As you can see from the returned NSRect values, I'm given the correct width and height of the NSTableView, but what I'm really after is their position relative to the parent NSSplitView. Of course, I could use (a number of) IBOutlets and construct the correct rect value myself, but what I'm really looking for is an easy way to grab the frame of the NSTableViews relative to either the parent NSSplitView or the containing Window.
Any ideas?