mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-28 19:08:50 +00:00
Added missing "var"s to various parts of Objective-J
This commit is contained in:
1 parent
dadabd899d
commit
aa146613ac
6 files changed
+27
-27
No files matched your search
@@ -106,12 +106,10 @@ function objj_printf(string)
|
||||
}
|
||||
|
||||
#if RHINO
|
||||
|
||||
warning_stream = function (aString) { Packages.java.lang.System.out.println(aString) };
|
||||
|
||||
var warning_stream = function (aString) { Packages.java.lang.System.out.println(aString) };
|
||||
#else
|
||||
if (window.console && window.console.warn)
|
||||
warning_stream = function(aString) { window.console.warn(aString); }
|
||||
var warning_stream = function(aString) { window.console.warn(aString); }
|
||||
else
|
||||
warning_stream = function(){};
|
||||
var warning_stream = function(){};
|
||||
#endif
|
||||
@@ -158,6 +158,7 @@ function fragment_evaluate_code(aFragment)
|
||||
try
|
||||
{
|
||||
#if RHINO
|
||||
//compiled = eval("function(){"+GET_CODE(aFragment)+"}");
|
||||
compiled = Packages.org.mozilla.javascript.Context.getCurrentContext().compileFunction(window, "function(){"+GET_CODE(aFragment)+"}", GET_FILE(aFragment).path, 0, null);
|
||||
#else
|
||||
compiled = new Function(GET_CODE(aFragment));
|
||||
|
||||
+11
-10
@@ -27,11 +27,11 @@
|
||||
// Look inside bundleResponseCallback.
|
||||
|
||||
|
||||
OBJJ_PLATFORMS = PLATFORMS
|
||||
var OBJJ_PLATFORMS = PLATFORMS;
|
||||
#define DIRECTORY(aPath) (aPath).substr(0, (aPath).lastIndexOf('/') + 1)
|
||||
|
||||
OBJJFileNotFoundException = "OBJJFileNotFoundException";
|
||||
OBJJExecutableNotFoundException = "OBJJExecutableNotFoundException";
|
||||
var OBJJFileNotFoundException = "OBJJFileNotFoundException",
|
||||
OBJJExecutableNotFoundException = "OBJJExecutableNotFoundException";
|
||||
|
||||
var objj_files = { },
|
||||
objj_bundles = { },
|
||||
@@ -169,7 +169,7 @@ objj_search.prototype.attemptNextSearchPath = function()
|
||||
|
||||
// Before we kick off our ajax requests, see whether this directory already has
|
||||
// a bundle associated with it.
|
||||
var infoPath = objj_standardize_path(DIRECTORY(searchPath) + "Info.plist")
|
||||
var infoPath = objj_standardize_path(DIRECTORY(searchPath) + "Info.plist"),
|
||||
bundle = objj_bundles[infoPath];
|
||||
|
||||
// If there is, then simply look for the file in question.
|
||||
@@ -502,7 +502,7 @@ function objj_standardize_path(aPath)
|
||||
|
||||
IF (ACTIVE_X)
|
||||
|
||||
objj_standardize_xml = function(aRequest)
|
||||
var objj_standardize_xml = function(aRequest)
|
||||
{
|
||||
var XMLData = new ActiveXObject("Microsoft.XMLDOM");
|
||||
XMLData.loadXML(aRequest.responseText.substr(aRequest.responseText.indexOf(".dtd\">") + 6));
|
||||
@@ -512,7 +512,7 @@ objj_standardize_xml = function(aRequest)
|
||||
|
||||
ELSE
|
||||
|
||||
objj_standardize_xml = function(aRequest)
|
||||
var objj_standardize_xml = function(aRequest)
|
||||
{
|
||||
return aRequest.responseXML;
|
||||
}
|
||||
@@ -534,7 +534,7 @@ function objj_response_xmlhttp()
|
||||
|
||||
IF (NATIVE_XMLHTTPREQUEST)
|
||||
|
||||
objj_request_xmlhttp = function()
|
||||
var objj_request_xmlhttp = function()
|
||||
{
|
||||
return new XMLHttpRequest();
|
||||
}
|
||||
@@ -563,7 +563,7 @@ var MSXML_XMLHTTP = MSXML_XMLHTTP_OBJECTS[index];
|
||||
delete index;
|
||||
delete MSXML_XMLHTTP_OBJECTS;
|
||||
|
||||
objj_request_xmlhttp = function()
|
||||
var objj_request_xmlhttp = function()
|
||||
{
|
||||
return new ActiveXObject(MSXML_XMLHTTP);
|
||||
}
|
||||
@@ -571,7 +571,7 @@ objj_request_xmlhttp = function()
|
||||
ENDIF
|
||||
|
||||
|
||||
OBJJUnrecognizedFormatException = "OBJJUnrecognizedFormatException";
|
||||
var OBJJUnrecognizedFormatException = "OBJJUnrecognizedFormatException";
|
||||
|
||||
var STATIC_MAGIC_NUMBER = "@STATIC",
|
||||
MARKER_PATH = "p",
|
||||
@@ -594,7 +594,8 @@ function objj_decompile(aString, bundle)
|
||||
objj_exception_throw(new objj_exception(OBJJUnrecognizedFormatException, "*** Could not recognize executable code format."));
|
||||
|
||||
var file = NULL,
|
||||
files = [];
|
||||
files = [],
|
||||
marker;
|
||||
|
||||
while (marker = stream.getMarker())
|
||||
{
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
kCFPropertyListOpenStepFormat = 1;
|
||||
kCFPropertyListXMLFormat_v1_0 = 100;
|
||||
kCFPropertyListBinaryFormat_v1_0 = 200;
|
||||
kCFPropertyList280NorthFormat_v1_0 = -1000;
|
||||
var kCFPropertyListOpenStepFormat = 1,
|
||||
kCFPropertyListXMLFormat_v1_0 = 100,
|
||||
kCFPropertyListBinaryFormat_v1_0 = 200,
|
||||
kCFPropertyList280NorthFormat_v1_0 = -1000;
|
||||
|
||||
OBJJPlistParseException = "OBJJPlistParseException";
|
||||
OBJJPlistSerializeException = "OBJJPlistSerializeException";
|
||||
var OBJJPlistParseException = "OBJJPlistParseException",
|
||||
OBJJPlistSerializeException = "OBJJPlistSerializeException";
|
||||
|
||||
var kCFPropertyList280NorthMagicNumber = "280NPLIST";
|
||||
|
||||
@@ -191,7 +191,7 @@ var XML_XML = "xml",
|
||||
PLIST_BOOLEAN_TRUE = "true",
|
||||
PLIST_BOOLEAN_FALSE = "false",
|
||||
PLIST_NUMBER_REAL = "real",
|
||||
PLIST_NUMBER_INTEGER = "integer";
|
||||
PLIST_NUMBER_INTEGER = "integer",
|
||||
PLIST_DATA = "data";
|
||||
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
OBJJ_PREPROCESSOR_DEBUG_SYMBOLS = 1 << 0;
|
||||
var OBJJ_PREPROCESSOR_DEBUG_SYMBOLS = 1 << 0;
|
||||
|
||||
function objj_preprocess(/*String*/ aString, /*objj_bundle*/ aBundle, /*objj_file*/ aSourceFile, /*unsigned*/ flags)
|
||||
{
|
||||
try
|
||||
{
|
||||
return new objj_preprocessor(aString, aSourceFile, aBundle, flags).fragments();
|
||||
return new objj_preprocessor(aString.replace(/^#[^\n]+\n/, "\n"), aSourceFile, aBundle, flags).fragments();
|
||||
}
|
||||
catch (anException)
|
||||
{
|
||||
@@ -36,8 +36,8 @@ function objj_preprocess(/*String*/ aString, /*objj_bundle*/ aBundle, /*objj_fil
|
||||
return [];
|
||||
}
|
||||
|
||||
OBJJParseException = "OBJJParseException";
|
||||
OBJJClassNotFoundException = "OBJJClassNotFoundException";
|
||||
var OBJJParseException = "OBJJParseException",
|
||||
OBJJClassNotFoundException = "OBJJClassNotFoundException";
|
||||
|
||||
var TOKEN_ACCESSORS = "accessors",
|
||||
TOKEN_CLASS = "class",
|
||||
|
||||
@@ -296,7 +296,7 @@ function class_getMethodImplementation(/*Class*/ aClass, /*SEL*/ aSelector)
|
||||
|
||||
// Adding Classes
|
||||
|
||||
var GLOBAL_NAMESPACE = this,
|
||||
var GLOBAL_NAMESPACE = window,
|
||||
REGISTERED_CLASSES = {};
|
||||
|
||||
function objj_allocateClassPair(/*Class*/ superclass, /*String*/ aName)
|
||||
|
||||
Reference in new issue
Block a user