On Wednesday, January 29, 2003, at 01:50 PM, Rich Morin wrote:
You need to connect the control to the outlet. To do that:? $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).
If you're using the default "MyWindowController" class and "MainWindow" NIB that are included in a new project, you can skip this first paragraph. If not, you'll need to tell IB what class the NIB's owner will belong to. To do that, choose the "Classes" tab in the IB main window, select the "NSObject" class in the class browser, choose the "Classes/Subclass NSObject" menu item, and enter the name of your controller class. Then, in the "Instances" tab, select "File's Owner." Your controller class should appear in the "Attributes" pane of the Info panel; select it, and you're done.
Double-click the "File's Owner" icon to edit the class definition. In the Info panel, select the "Outlets" tab and click the "Add" button. Be sure to name the outlet the same as you've named it in your code - 'TabView' in this case.
It's worth mentioning that, due to a bug in CamelBone's handling of Key-Value Coding, outlets that begin with a lowercase letter - i.e. "tabView" don't work. :-(
When you're finished adding outlets to your class, select the "Instances" tab again in the main IB window. You connect the outlet by control-dragging from the "File's Owner" icon to the TabView widget. (This is similar to connecting an action, but in reverse.) The Info panel will display a list of Outlets, with a dot next to the ones that aren't yet connected. Choose the one you want to connect to, and click "Connect."
sherm--
If you listen to a UNIX shell, can you hear the C?
