Merge branch 'master' of git@github.com:280north/cappuccino

This commit is contained in:
Francisco Ryan Tolmasky I committed 2009-08-22 01:45:30 -07:00
commit 1b4a5dc48b
2 files changed
+9 -9

No files matched your search

+2 -2
View File
@@ -1186,8 +1186,8 @@ CPTexturedBackgroundWindowMask
- (void)center
{
var size = [self frame].size,
containerSize = [_platformWindow contentBounds].size;
containerSize = [CPPlatform isBrowser] ? [_platformWindow contentBounds].size : [[self screen] visibleFrame].size;
[self setFrameOrigin:CGPointMake((containerSize.width - size.width) / 2.0, (containerSize.height - size.height) / 2.0)];
}
+7 -7
View File
@@ -1,7 +1,8 @@
#!/usr/bin/env narwhal
var objj = require("objj/objj"),
File = require("file");
File = require("file"),
os = require("os");
require("objj/regexp-rhino-patch");
@@ -75,7 +76,7 @@ function GET_PATH(aFragment) { return aFragment.info; }
//#define GET_BUNDLE(aFragment) aFragment.bundle
//#define SET_BUNDLE(aFragment, aBundle) aFragment.bundle = aBundle
//#define GET_FILE(aFragment) aFragment.file
function GET_FILE(aFragment) { return aFragment.file; }
//#define SET_FILE(aFragment, aFile) aFragment.file = aFile
function IS_FILE(aFragment) { return (aFragment.type & FRAGMENT_FILE); }
@@ -139,15 +140,14 @@ function preprocess(aFilePath, outFilePath, gccArgs, flags)
}
catch (e)
{
var lines = e.fragment.info.split("\n"),
var lines = code.split("\n"),
PAD = 3;
System.out.println(
"Syntax error in "+e.fragment.file.path+
print("Syntax error in "+GET_FILE(fragment).path+
" on preprocessed line number "+e.lineNumber+"\n"+
"\t"+lines.slice(e.lineNumber-1-PAD<0 ? 0 : e.lineNumber-1-PAD, e.lineNumber+PAD).join("\n\t"));
"\t"+lines.slice(Math.max(0, e.lineNumber - 1 - PAD), e.lineNumber+PAD).join("\n\t"));
System.exit(1);
os.exit(1);
}
}