Permalink
Browse files

Fixed some 10.6 deprecation warnings.

  • Loading branch information...
1 parent 1d83afe commit 979a9ea47fed6aa7ad4ab3eb8a5b1870cb0c1513 @ccgus committed Aug 15, 2010
Showing with 11 additions and 14 deletions.
  1. +0 −2 jstalk.xcodeproj/project.pbxproj
  2. +1 −1 src/JSTDocument.h
  3. +6 −6 src/JSTDocument.m
  4. +2 −3 src/JSTalk.m
  5. +1 −1 src/jstalkmain.m
  6. +1 −1 src/todparsekit/TDDigit.m
@@ -207,7 +207,6 @@
CC975BC80F47E5BD00097108 /* JSTPreprocessor.h in Headers */ = {isa = PBXBuildFile; fileRef = CC975BC60F47E5BD00097108 /* JSTPreprocessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
CC975BC90F47E5BD00097108 /* JSTPreprocessor.m in Sources */ = {isa = PBXBuildFile; fileRef = CC975BC70F47E5BD00097108 /* JSTPreprocessor.m */; };
CC975BCA0F47E5BD00097108 /* JSTPreprocessor.m in Sources */ = {isa = PBXBuildFile; fileRef = CC975BC70F47E5BD00097108 /* JSTPreprocessor.m */; };
- CCA69D571203BE0300C23AE7 /* jslint-jscocoa.js in Sources */ = {isa = PBXBuildFile; fileRef = CCA69D561203BE0300C23AE7 /* jslint-jscocoa.js */; };
CCA69D641203BE6000C23AE7 /* jslint-jscocoa.js in Resources */ = {isa = PBXBuildFile; fileRef = CCA69D561203BE0300C23AE7 /* jslint-jscocoa.js */; };
CCC5B8A50F1EFA6D00126722 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCC5B8A40F1EFA6D00126722 /* JavaScriptCore.framework */; };
CCC5B8C70F1EFA9700126722 /* JSTDocument.xib in Resources */ = {isa = PBXBuildFile; fileRef = CCC5B8BA0F1EFA9700126722 /* JSTDocument.xib */; };
@@ -1037,7 +1036,6 @@
CC0FEEE510867410008FF7DD /* MarkerLineNumberView.m in Sources */,
CC0FEEE710867411008FF7DD /* NoodleLineNumberMarker.m in Sources */,
CC0FEEE910867412008FF7DD /* NoodleLineNumberView.m in Sources */,
- CCA69D571203BE0300C23AE7 /* jslint-jscocoa.js in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
@@ -11,7 +11,7 @@
#import "JSTTextView.h"
#import "JSTFileWatcher.h"
-@interface JSTDocument : NSDocument {
+@interface JSTDocument : NSDocument <NSToolbarDelegate> {
IBOutlet JSTTextView *jsTextView;
IBOutlet NSTextView *outputTextView;
IBOutlet NSSplitView *splitView;
View
@@ -63,8 +63,8 @@ - (void) readFromFile:(NSURL*)fileURL {
[[[jsTextView textStorage] mutableString] setString:src];
}
- [[[[self windowControllers] objectAtIndex:0] window] setFrameAutosaveName:[self fileName]];
- [splitView setAutosaveName:[self fileName]];
+ [[[[self windowControllers] objectAtIndex:0] window] setFrameAutosaveName:[[self fileURL] path]];
+ [splitView setAutosaveName:[[self fileURL] path]];
}
- (void)windowControllerDidLoadNib:(NSWindowController *) aController {
@@ -259,7 +259,7 @@ - (void)savePanelDidEndForApplicationSave:(NSSavePanel *)sheet returnCode:(int)r
}
if ([[NSFileManager defaultManager] fileExistsAtPath:fileName]) {
- if (![[NSFileManager defaultManager] removeFileAtPath:fileName handler:nil]) {
+ if (![[NSFileManager defaultManager] removeItemAtPath:fileName error:nil]) {
NSRunAlertPanel(@"Could not remove file", @"Sorry, but I could not remove the old file in order to save your application.", @"OK", nil, nil);
NSBeep();
return;
@@ -268,7 +268,7 @@ - (void)savePanelDidEndForApplicationSave:(NSSavePanel *)sheet returnCode:(int)r
NSString *runnerPath = [[NSBundle mainBundle] pathForResource:@"JSTalkRunner" ofType:@"app"];
- if (![[NSFileManager defaultManager] copyPath:runnerPath toPath:fileName handler:nil]) {
+ if (![[NSFileManager defaultManager] copyItemAtPath:runnerPath toPath:fileName error:nil]) {
NSRunAlertPanel(@"Could not save", @"Sorry, but I could not save the application to the folder", @"OK", nil, nil);
return;
}
@@ -352,10 +352,10 @@ - (void) externalEditorAction:(id)sender {
}
// setup our watcher.0
- self.externalEditorFileWatcher = [JSTFileWatcher fileWatcherWithPath:[self fileName] delegate:self];
+ self.externalEditorFileWatcher = [JSTFileWatcher fileWatcherWithPath:[[self fileURL] path] delegate:self];
// and away we go.
- [[NSWorkspace sharedWorkspace] openFile:[self fileName] withApplication:appPath];
+ [[NSWorkspace sharedWorkspace] openFile:[[self fileURL] path] withApplication:appPath];
}
- (void) fileWatcherDidRecieveFSEvent:(JSTFileWatcher*)fw {
View
@@ -151,13 +151,12 @@ - (void)loadPlugins {
NSString *userPath = [NSHomeDirectory() stringByAppendingPathComponent:appSupport];
if (![[NSFileManager defaultManager] fileExistsAtPath:userPath]) {
- [[NSFileManager defaultManager] createDirectoryAtPath:[userPath stringByDeletingLastPathComponent] attributes:nil];
- [[NSFileManager defaultManager] createDirectoryAtPath:userPath attributes:nil];
+ [[NSFileManager defaultManager] createDirectoryAtPath:userPath withIntermediateDirectories:YES attributes:nil error:nil];
}
for (NSString *folder in [NSArray arrayWithObjects:appPath, sysPath, userPath, nil]) {
- for (NSString *bundle in [[NSFileManager defaultManager] directoryContentsAtPath:folder]) {
+ for (NSString *bundle in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:folder error:nil]) {
if (!([bundle hasSuffix:@".jstplugin"])) {
continue;
View
@@ -12,7 +12,7 @@ @implementation JSCErrorHandler
- (void) JSCocoa:(JSCocoaController*)controller hadError:(NSString*)error onLineNumber:(NSInteger)lineNumber atSourceURL:(id)url {
- NSLog(@"Error line %d, %@", lineNumber, error);
+ NSLog(@"Error line %d, %@", (int)lineNumber, error);
exit(1);
}
@@ -17,7 +17,7 @@ + (id)digit {
- (BOOL)qualifies:(id)obj {
NSInteger c = [obj integerValue];
- return isdigit(c);
+ return isdigit((int)c);
}
@end

0 comments on commit 979a9ea

Please sign in to comment.