BWToolkit / BWViewController.h

Full commit
//  BWViewController.h
//  BWToolkit
//  Created by Mike on 03/07/2010.
//  Copyright 2010 Karelia Software. All rights reserved.

#import <Cocoa/Cocoa.h>

@interface BWViewController : NSViewController
    NSString            *_identifier;
    BWViewController    *_parent;   // weak ref

@property(nonatomic, copy) NSString *identifier;
@property(nonatomic, assign) BWViewController *parentViewController;


#pragma mark -

@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
- (NSString *)identifier;

//  Default implementations of these do nothing. But you should really call super if you override for forwards compatibility
- (void)viewWillAppear:(BOOL)animated;
- (void)viewDidAppear:(BOOL)animated;
- (void)viewWillDisappear:(BOOL)animated;
- (void)viewDidDisappear:(BOOL)animated;

// Default implementation does nothing. If desired in a subclass, override to store a *weak* reference
- (void)setParentViewController:(BWViewController *)parent;