Mike Abdullah  committed ef4029a

BWViewController implements full property for .identifier

  • Participants
  • Parent commits 9db0f55
  • Branches default

Comments (0)

Files changed (4)

File BWTabViewController.h

 @interface BWTabViewController : BWViewController <NSTabViewDelegate, NSCoding>
-    NSString        *_identifier;
     NSTabView       *_tabView;
     NSTabViewType   _tabViewType;
 @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

File BWTabViewController.m

     [self setTabView:nil];  // releases view and tears down binding/delegation
-    [_identifier release];
     [_tabViewItems release];
     [_viewControllers release];
-@synthesize identifier = _identifier;
 #pragma mark Managing the View Controllers
 - (NSArray *)viewControllers

File BWViewController.h

 #import <Cocoa/Cocoa.h>
-@interface BWViewController : NSViewController {
+@interface BWViewController : NSViewController
+  @private
+    NSString    *_identifier;
+@property(nonatomic, copy) NSString *identifier;
 @interface NSViewController (BWViewController)
 // This implementation returns nil since there's no good way to provide a setter method on 10.5. But subclasses are welcome to re-implement
-@property(nonatomic, readonly) NSString *identifier;
+- (NSString *)identifier;
 //  Default implementations of these do nothing. But you should really call super if you override for forwards compatibility
 - (void)viewWillAppear:(BOOL)animated;

File BWViewController.m

 @implementation BWViewController
+- (void)dealloc
+    [_identifier release];
+    [super dealloc];
+@synthesize identifier = _identifier;