Skip to content

Commit

Permalink
Fix for broken resources in DEBUG builds.
Browse files Browse the repository at this point in the history
[cappuccino#139 state:resolved]

Reviewed by me.
  • Loading branch information
Francisco Ryan Tolmasky I committed Nov 13, 2008
1 parent eee0338 commit 9e8eff4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Foundation/CPBundle.j
Expand Up @@ -61,12 +61,12 @@

- (CPString)resourcePath
{
var path = [self bundlePath];
var resourcePath = [self bundlePath];

if (path.length)
path += '/';
if (resourcePath.length)
resourcePath += '/';

return path + "Resources";
return resourcePath + "Resources";
}

- (Class)principalClass
Expand Down
9 changes: 4 additions & 5 deletions Objective-J/preprocess.js
Expand Up @@ -26,9 +26,7 @@ function objj_preprocess(/*String*/ aString, /*objj_bundle*/ aBundle, /*objj_fil
{
try
{
OBJJ_CURRENT_BUNDLE = aBundle;

return new objj_preprocessor(aString, aSourceFile, flags).fragments();
return new objj_preprocessor(aString, aSourceFile, aBundle, flags).fragments();
}
catch (anException)
{
Expand Down Expand Up @@ -135,7 +133,7 @@ objj_stringBuffer.prototype.isEmpty = function()
return (this.atoms.length === 0);
}

var objj_preprocessor = function(aString, aSourceFile, flags)
var objj_preprocessor = function(aString, aSourceFile, aBundle, flags)
{
this._currentClass = "";
this._currentSuperClass = "";
Expand All @@ -145,6 +143,7 @@ var objj_preprocessor = function(aString, aSourceFile, flags)
this._preprocessed = new objj_stringBuffer();
this._tokens = new objj_lexer(aString);
this._flags = flags;
this._bundle = aBundle;

this.preprocess(this._tokens, this._preprocessed);
this.fragment();
Expand Down Expand Up @@ -452,7 +451,7 @@ objj_preprocessor.prototype.fragment = function()

// But make sure it's not just all whitespace!
if ((/[^\s]/).test(preprocessed))
this._fragments.push(fragment_create_code(preprocessed, OBJJ_CURRENT_BUNDLE, this._file));
this._fragments.push(fragment_create_code(preprocessed, this._bundle, this._file));

this._preprocessed.clear();
}
Expand Down

0 comments on commit 9e8eff4

Please sign in to comment.