X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fthecheat;a=blobdiff_plain;f=CheatURLCommand.m;fp=CheatURLCommand.m;h=3eda345e879130bbadd9c96986feec34af59f097;hp=0000000000000000000000000000000000000000;hb=d27548f80fe411fda2ee69c74a24eab4292267e9;hpb=e8d51183acdd2410a38dcf8f0efbf7c30cd6c581 diff --git a/CheatURLCommand.m b/CheatURLCommand.m new file mode 100644 index 0000000..3eda345 --- /dev/null +++ b/CheatURLCommand.m @@ -0,0 +1,30 @@ +// +// CheatURLCommand.m +// The Cheat +// +// Created by Chaz McGarvey on 2/19/05. +// Copyright 2005 Chaz McGarvey. All rights reserved. +// + +#import "CheatURLCommand.h" + + +@implementation CheatURLCommand + +- (id)performDefaultImplementation +{ + NSDocumentController *controller = [NSDocumentController sharedDocumentController]; + CheatDocument *doc = [controller makeUntitledDocumentOfType:@"Cheat Document"]; + if ( !doc ) { + ChazLog( @"nil document" ); + } + [doc setMode:TCSearchMode]; + [doc setConnectOnOpen:NO]; + [controller addDocument:doc]; + [doc makeWindowControllers]; + [doc showWindows]; + [doc connectWithURL:[self directParameter]]; + return nil; +} + +@end