Commits

Mike Abdullah  committed c90e248

BWTabViewController gains .identifier property which could be handy if you nest them. Also tidying up header a little

  • Participants
  • Parent commits 69f2929

Comments (0)

Files changed (2)

File BWTabViewController.h

 @interface BWTabViewController : NSViewController <NSTabViewDelegate>
 {
   @private
+    NSString        *_identifier;
     NSTabView       *_tabView;
     NSTabViewType   _tabViewType;
     
 - (id)init; // the default top tabs look
 
 
+#pragma mark View Properties
+
 @property(nonatomic, retain) IBOutlet NSTabView *tabView;   // separate to -view. Do NOT rely on them being the same.
 @property(nonatomic, readonly, getter=isTabViewLoaded) BOOL tabViewLoaded;
 
+@property(nonatomic, copy) NSString *identifier;
+
+
+#pragma mark Managing the View Controllers
+
 @property(nonatomic, copy, readonly) NSArray *viewControllers;
 - (void)insertViewController:(NSViewController *)controller atIndex:(NSUInteger)index;
 - (void)addViewController:(NSViewController *)controller;
 - (NSViewController *)viewControllerForIdentifier:(NSString *)identifier;
 
 
-#pragma mark Selection
+#pragma mark Managing the Selected Tab
 
 //  Both are KVO-compliant
 @property(nonatomic, assign) NSViewController *selectedViewController;

File BWTabViewController.m

 {
     [self setTabView:nil];  // releases view and tears down binding/delegation
     
+    [_identifier release];
     [_tabViewItems release];
     [_viewControllers release];
     
     [super dealloc];
 }
 
-#pragma mark View
+#pragma mark View Properties
 
 - (NSTabView *)tabView
 {
     }
 }
 
-#pragma mark View controllers
+@synthesize identifier = _identifier;
+
+#pragma mark Managing the View Controllers
 
 - (NSArray *)viewControllers
 {
     return nil;
 }
 
-#pragma mark Selection
+#pragma mark Managing the Selected Tab
 
 // Propogating selection to tabview is performed by binding.
 @synthesize selectedViewController = _selectedViewController;