Re: Nib files
Re: Nib files
- Subject: Re: Nib files
- From: Keith Wilson <email@hidden>
- Date: Wed, 8 Feb 2006 15:27:06 +1100
I reckon separate nibs is the hard way to do it.
I have an app with a NSTabView with 13 tabs that each displays a
NSTableView.
I have subclassed NSTableView so the code I write is minimal, but
the data
in the TableViews is linked via different ArrayControllers to a
CoreData model.
So the simplest way was to draw a generic TableView in IB, then cut
and paste,
then hook up the bindings for the columns to the ArrayControllers.
Not so elegant
but works fine.
I don't bother sizing the tablle views to look neat in IB (painful).
I do the frame and
column width sizing in code to avoud fiddling ariund in IB, for
instance the TableView
awakeFromNib looks like
-(void)awakeFromNib
{
[self setGridStyleMask:NSTableViewSolidVerticalGridLineMask];
[self setUsesAlternatingRowBackgroundColors:YES];
[self setColumnWidths]; //sets the default column widths proportionally
[self setAutoresizesSubviews:YES];
[self setAutoresizingMask:NSViewWidthSizable];
SetFontSize(self, 11); //for each column - also sets the rowHeight
}
Regards, Keith
On 08/02/2006, at 10:00 AM, Alan Smith wrote:
I'm working on a project helper that will store data like bugs,
requested
features, to do… I want it to have a file for each project and it
will save
the data to it's projects file. Now it will be a window with tabs
and each
tab will be one of those groups, bugs, to do… and the look will be
the same
for each tab. So is there a way display each tab as having the same
nib file
without coding each tab to display the same file, it seems a waste
of code?
They would each need to display the corresponding data group w/o
displaying
the others on top of that. The other question is, how do I then
save the
data from each tab individually and not the data from the others at
the same
time, if they're all using the same nib? This may not be clear, if
it isn't
let me know.
Thanks in advance, Alan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40bigpond.net.au
This email sent to email@hidden
_______________________________________________
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
References: | |
| >Nib files (From: Alan Smith <email@hidden>) |