mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-10 02:40:59 +00:00
formatting and now subclassing is tested by Open a document
This commit is contained in:
1 parent
310422adb1
commit
fabe1d8991
5 files changed
+17
-10
No files matched your search
@@ -12,20 +12,17 @@
|
||||
|
||||
@implementation AppController : CPObject
|
||||
{
|
||||
CPDocumentController subclassedCPDocumentController;
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
|
||||
{
|
||||
// This is called when the application is done loading.
|
||||
var cpAlert = [CPAlert alertWithMessageText:@"Is this the shared instance? " + ([CPDocumentController sharedDocumentController] == subclassedCPDocumentController) defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithFormat:nil];
|
||||
[cpAlert beginSheetModalForWindow:[[CPApplication sharedApplication] mainWindow]];
|
||||
}
|
||||
|
||||
- (void)applicationWillFinishLaunching:(CPNotification)aNotification
|
||||
{
|
||||
// instantiate a subclass of DocumentController
|
||||
subclassedCPDocumentController = [[DocumentController alloc] init];
|
||||
[[DocumentController alloc] init];
|
||||
}
|
||||
|
||||
- (void)awakeFromCib
|
||||
|
||||
@@ -12,4 +12,12 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
/* Instead of throwing error in browser environment, show an alert
|
||||
*/
|
||||
- (void)openDocument:(id)aSender
|
||||
{
|
||||
var anAlert = [CPAlert alertWithError:@"Opening a document is not available!"];
|
||||
[anAlert beginSheetModalForWindow:[[CPApplication sharedApplication] mainWindow]];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user