On Wednesday, January 29, 2003, at 07:14 AM, Rich Morin wrote:
Nope. :-(OK; here's another silly question. I found this useful-looking method:- (void)selectFirstTabViewItem:(id)sender Selects the first tab view item. It looks like I can use this to control the tab that gets set by default when the app starts up.
"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.
Similarly, the selectLastTabViewItem:, selectNextTabViewItem:, and selectPreviousTabViewItem: methods all affect the currently selected tab - not 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.how am I supposed to set the default?
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.
The window is still invisible though, so once everything is set up, call one of NSWindow's many window ordering methods on the window object - usually you'll want either orderFront: or makeKeyAndOrderFront:. (Similarly, the orderOut: method makes a window invisible without unloading it.)
sherm--
C programmers never die - they're just cast into void.
