diff --git a/AppKit/CPViewController.j b/AppKit/CPViewController.j index c66f021f8..3fffe261d 100644 --- a/AppKit/CPViewController.j +++ b/AppKit/CPViewController.j @@ -138,8 +138,6 @@ var CPViewControllerCachedCibs; Returns the view that the controller manages. If this property is nil, the controller sends loadView to itself to create the view that it manages. Subclasses should override the loadView method to create any custom views. The default value is nil. - - Note: An error will not be thrown if after -loadView, the view property is still nil. -view will simply return nil, but will continue to call -loadView on subsequent calls. */ - (CPView)view { @@ -155,14 +153,34 @@ var CPViewControllerCachedCibs; if (_view === nil && [cibOwner isKindOfClass:[CPDocument class]]) [self setView:[cibOwner valueForKey:@"view"]]; + if (!_view) + { + var reason = [CPString stringWithFormat:@"View for %@ could not be loaded from Cib or no view specified. Override loadView to load the view manually.", self]; + + [CPException raise:CPInternalInconsistencyException reason:reason]; + } + if ([cibOwner respondsToSelector:@selector(viewControllerDidLoadCib:)]) [cibOwner viewControllerDidLoadCib:self]; + + [self viewDidLoad]; } return _view; } +/*! + This method is called after the view controller has loaded its associated views into memory. + This method is called regardless of whether the views were stored in a nib file or created programmatically in the loadView method. + This method is most commonly used to perform additional initialization steps on views that are loaded from nib files. +*/ +- (void)viewDidLoad +{ + +} + + /*! Manually sets the view that the controller manages. Setting to nil will cause -loadView to be called on all subsequent calls of -view. diff --git a/bootstrap.sh b/bootstrap.sh index 8d03401f5..8f3a5a1ff 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -166,13 +166,13 @@ if ! prompt; then exit 1 fi -echo "================================================================================" -echo "Would you like to install the pre-built Objective-J and Cappuccino packages?" -echo "If you intend to build Cappuccino yourself this is not neccessary." -extra_packages="" -if prompt; then - extra_packages="objective-j cappuccino" -fi +# echo "================================================================================" +# echo "Would you like to install the pre-built Objective-J and Cappuccino packages?" +# echo "If you intend to build Cappuccino yourself this is not neccessary." +# extra_packages="" +# if prompt; then +# extra_packages="objective-j cappuccino" +# fi echo "Installing necessary packages..."