Article:
 |
|
Adding Spit and Polish to Your Cocoa App
|
| Subject: |
|
Didn't Compile |
| Date: |
|
2002-06-14 16:47:13 |
| From: |
|
johnts
|
|
|
|
After the first changes, when the article said to compile and try it, I got syntax errors, even after copying the code from the page. I had to change it to:
- (BOOL)application:(NSApplication *)theApplication
openFile:(NSString *)filename
{
NSDocumentController *dc;
id doc;
dc = [NSDocumentController sharedDocumentController];
doc = [dc openDocumentWithContentsOfFile:filename display:YES];
return ( doc != nil);
}
(it complained about the declaration of doc as it was.)
|
Showing messages 1 through 2 of 2.
-
Didn't Compile
2002-06-17 19:19:32
Michael Beam |
[View]
-
order of statements in method
2002-06-19 22:13:44
psheldon
[View]
NSDocumentController *dc = [NSDocumentController sharedDocumentController];
became:
NSDocumentController *dc;
dc = [NSDocumentController sharedDocumentController];
b/c the original was too wide. I'll get that fixed. Thanks for spotting it!
Mike