At 8:18 AM -0500 1/29/03, Sherm Pendley wrote:
"First" in this case means the first in the row - that is, the tab
view item with index 0. Usually that's the leftmost item, but that
may be different if the local language reads from right to left, as
opposed to English's left to right. I don't know - I speak only
English.
Thanks for the clarification. As it happens, however, I AM trying
to set the first item in the row as the default.
In Interface Builder. Remember, a NIB is a serialized copy of all
the objects in it, so any object attributes that you set in IB are
still set when you load the NIB. So, whatever tab is selected when
you save the NIB will still be selected when it's loaded.
Silly me; I tried looking for a setting in the NSTabView Info window.
If you want to preserve the state of the tab from one session to the
next, uncheck the window's "Visible at Launch Time" attribute in IB
- this will keep it from immediately displaying itself when the NIB
is loaded. After loading the NIB and calling the window() method,
load the user preferences and set whatever properties need to be set
for the tab view or anything else.
Ah, so there IS a way to grab the TabView object at startup time, in
order to set its properties. OK; here we are in "new()":
...
# Outlets
$self->{'Window'} = undef;
$self->{'PathName'} = undef;
? $self->{'TabView'} = undef;
bless ($self, $class);
$self->{'NSWindowController'} =
NSWindowController->alloc->initWithWindowNibName_owner(
"MainWindow", $self);
$self->{'NSWindowController'}->window;
? $self->{'TabView'}->selectFirstTabViewItem();
? $self->{'Window'}->makeKeyAnOrderFront();
return $self;
}
Are the "?" lines about right? Also, I don't see how to identify
the particular tabView (e.g., in IB).
-r
--
email: [EMAIL PROTECTED]; phone: +1 650-873-7841
http://www.cfcl.com/rdm - my home page, resume, etc.
http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series
http://www.ptf.com/tdc - Prime Time Freeware's Darwin Collection