Created
February 10, 2010 02:55
-
-
Save tolmasky/299970 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/AppKit/CPApplication.j b/AppKit/CPApplication.j | |
| index c8debf4..e5452ee 100644 | |
| --- a/AppKit/CPApplication.j | |
| +++ b/AppKit/CPApplication.j | |
| @@ -1043,7 +1043,7 @@ var _CPAppBootstrapperActions = nil; | |
| + (void)actions | |
| { | |
| - return [@selector(bootstrapPlatform), @selector(loadDefaultTheme), @selector(loadMainCibFile)]; | |
| + return [@selector(loadDefaultTheme)];//[@selector(bootstrapPlatform)];//[@selector(bootstrapPlatform), @selector(loadDefaultTheme), @selector(loadMainCibFile)]; | |
| } | |
| + (void)performActions | |
| @@ -1059,7 +1059,7 @@ var _CPAppBootstrapperActions = nil; | |
| return; | |
| } | |
| - [CPApp run]; | |
| + //[CPApp run]; | |
| } | |
| + (BOOL)bootstrapPlatform | |
| diff --git a/AppKit/CPColor.j b/AppKit/CPColor.j | |
| index cdc3af3..a9ec68e 100644 | |
| --- a/AppKit/CPColor.j | |
| +++ b/AppKit/CPColor.j | |
| @@ -712,7 +712,7 @@ var CPColorComponentsKey = @"CPColorComponentsKey", | |
| @param aCoder the coder from which the color will be loaded | |
| */ | |
| - (id)initWithCoder:(CPCoder)aCoder | |
| -{ | |
| +{return self; | |
| if ([aCoder containsValueForKey:CPColorPatternImageKey]) | |
| return [self _initWithPatternImage:[aCoder decodeObjectForKey:CPColorPatternImageKey]]; | |
| diff --git a/AppKit/CPCursor.j b/AppKit/CPCursor.j | |
| index f5e67f6..d0a9582 100755 | |
| --- a/AppKit/CPCursor.j | |
| +++ b/AppKit/CPCursor.j | |
| @@ -230,11 +230,11 @@ var currentCursor = nil, | |
| + (void)_setCursorCSS:(CPString)aString | |
| { | |
| #if PLATFORM(DOM) | |
| - [CPPlatformWindow primaryPlatformWindow]._DOMBodyElement.style.cursor = aString; | |
| + //[CPPlatformWindow primaryPlatformWindow]._DOMBodyElement.style.cursor = aString; | |
| - var platformWindows = [[CPPlatformWindow visiblePlatformWindows] allObjects]; | |
| - for (var i = 0, count = [platformWindows count]; i < count; i++) | |
| - platformWindows[i]._DOMBodyElement.style.cursor = aString; | |
| + //var platformWindows = [[CPPlatformWindow visiblePlatformWindows] allObjects]; | |
| + //for (var i = 0, count = [platformWindows count]; i < count; i++) | |
| + // platformWindows[i]._DOMBodyElement.style.cursor = aString; | |
| #endif | |
| } | |
| diff --git a/AppKit/CPFont.j b/AppKit/CPFont.j | |
| index a60fc32..7970a71 100644 | |
| --- a/AppKit/CPFont.j | |
| +++ b/AppKit/CPFont.j | |
| @@ -145,6 +145,16 @@ var CPFontNameKey = @"CPFontNameKey", | |
| */ | |
| - (id)initWithCoder:(CPCoder)aCoder | |
| { | |
| + if (window.DEADBEEF) | |
| + { | |
| + window.SECONDARY = true; | |
| + //debugger; | |
| + try { | |
| + [aCoder decodeBoolForKey:CPFontIsBoldKey]; | |
| + return [self _initWithName:@"Arial" | |
| + size:12.0//[aCoder decodeFloatForKey:CPFontSizeKey] | |
| + bold:NO]; } finally { window.SECONDARY = false; } | |
| + } | |
| return [self _initWithName:[aCoder decodeObjectForKey:CPFontNameKey] | |
| size:[aCoder decodeFloatForKey:CPFontSizeKey] | |
| bold:[aCoder decodeBoolForKey:CPFontIsBoldKey]]; | |
| diff --git a/AppKit/CPImage.j b/AppKit/CPImage.j | |
| index 32571ac..ff7d71a 100644 | |
| --- a/AppKit/CPImage.j | |
| +++ b/AppKit/CPImage.j | |
| @@ -263,22 +263,37 @@ function CPAppKitImage(aFilename, aSize) | |
| var isSynchronous = YES; | |
| // FIXME: We need a better/performance way of doing this. | |
| - _image.onload = function () | |
| + /*_image.onload = function () | |
| { | |
| - if (isSynchronous) | |
| - window.setTimeout(function() { [self _imageDidLoad]; }, 0); | |
| - else | |
| - { | |
| - [self _imageDidLoad]; | |
| - [[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode]; | |
| - } | |
| - [self _derefFromImage]; | |
| + try { | |
| + if (isSynchronous) | |
| + { | |
| + window.setNativeTimeout(function() { | |
| + debugger; | |
| + try { | |
| + [self _imageDidLoad]; | |
| + }catch(e){ | |
| + alert(e); | |
| + debugger; | |
| + } | |
| + }, 0); | |
| + } | |
| + else | |
| + { | |
| + [self _imageDidLoad]; | |
| + [[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode]; | |
| + } | |
| + //[self _derefFromImage]; | |
| + } catch(e){ | |
| + alert(e); | |
| + debugger; | |
| + } | |
| } | |
| _image.onerror = function () | |
| { | |
| if (isSynchronous) | |
| - window.setTimeout(function() { [self _imageDidError]; }, 0); | |
| + window.setNativeTimeout(function() { [self _imageDidError]; }, 0); | |
| else | |
| { | |
| [self _imageDidError]; | |
| @@ -298,12 +313,12 @@ function CPAppKitImage(aFilename, aSize) | |
| } | |
| [self _derefFromImage]; | |
| } | |
| - | |
| + */ | |
| _image.src = _filename; | |
| // onload and friends may fire after this point but BEFORE the end of the run loop, | |
| // crazy, I know. So don't set isSynchronous here, rather wait a bit longer. | |
| - window.setTimeout(function() { isSynchronous = NO; }, 0); | |
| + // window.setTimeout(function() { debugger; isSynchronous = NO; }, 0); | |
| } | |
| - (BOOL)isThreePartImage | |
| diff --git a/AppKit/CPThemeBlend.j b/AppKit/CPThemeBlend.j | |
| index cf52303..a30e2f0 100644 | |
| --- a/AppKit/CPThemeBlend.j | |
| +++ b/AppKit/CPThemeBlend.j | |
| @@ -26,6 +26,8 @@ | |
| @import <AppKit/_CPCibCustomResource.j> | |
| @import <AppKit/_CPCibKeyedUnarchiver.j> | |
| +#include "Platform/Platform.h" | |
| + | |
| /*! | |
| @ingroup appkit | |
| */ | |
| @@ -60,7 +62,10 @@ | |
| { | |
| var themes = [_bundle objectForInfoDictionaryKey:@"CPKeyedThemes"], | |
| count = themes.length; | |
| - | |
| +#if PLATFORM(DOM) | |
| +window.DEADBEEF = 1; | |
| +#endif | |
| +try{ | |
| while (count--) | |
| { | |
| var path = [aBundle pathForResource:themes[count]], | |
| @@ -70,10 +75,16 @@ | |
| [unarchiver decodeObjectForKey:@"root"]; | |
| - [unarchiver finishDecoding]; | |
| + //[unarchiver finishDecoding]; | |
| } | |
| - | |
| - [_loadDelegate blendDidFinishLoading:self]; | |
| +}catch(e){ | |
| + alert(e); | |
| + debugger; | |
| +} | |
| +#if PLATFORM(DOM) | |
| +window.DEADBEEF = 0; | |
| +#endif | |
| + //[_loadDelegate blendDidFinishLoading:self]; | |
| } | |
| @end | |
| diff --git a/AppKit/Platform/CPPlatform.j b/AppKit/Platform/CPPlatform.j | |
| index 8bf3785..f90f92e 100644 | |
| --- a/AppKit/Platform/CPPlatform.j | |
| +++ b/AppKit/Platform/CPPlatform.j | |
| @@ -31,8 +31,8 @@ | |
| + (void)bootstrap | |
| { | |
| - [CPPlatformString bootstrap]; | |
| - [CPPlatformWindow setPrimaryPlatformWindow:[[CPPlatformWindow alloc] _init]]; | |
| + //[CPPlatformString bootstrap]; | |
| + //[CPPlatformWindow setPrimaryPlatformWindow:[[CPPlatformWindow alloc] _init]]; | |
| } | |
| + (BOOL)isBrowser | |
| diff --git a/AppKit/Platform/DOM/CPPlatform.j b/AppKit/Platform/DOM/CPPlatform.j | |
| index e3a621f..ca90788 100644 | |
| --- a/AppKit/Platform/DOM/CPPlatform.j | |
| +++ b/AppKit/Platform/DOM/CPPlatform.j | |
| @@ -87,7 +87,7 @@ var screenNeedsInitialization = NO, | |
| } | |
| + (void)initializeScreenIfNecessary | |
| -{ | |
| +{return; | |
| if (!screenNeedsInitialization) | |
| return; | |
| diff --git a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j | |
| index e6cff49..dd3b17d 100644 | |
| --- a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j | |
| +++ b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j | |
| @@ -157,8 +157,8 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop]; | |
| _windowLevels = []; | |
| _windowLayers = [CPDictionary dictionary]; | |
| - [self registerDOMWindow]; | |
| - [self updateFromNativeContentRect]; | |
| + //[self registerDOMWindow]; | |
| + //[self updateFromNativeContentRect]; | |
| _charCodes = {}; | |
| } | |
| @@ -241,7 +241,7 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop]; | |
| _DOMFocusElement.style.filter = "alpha(opacity=0)"; | |
| _DOMFocusElement.className = "cpdontremove"; | |
| - _DOMBodyElement.appendChild(_DOMFocusElement); | |
| + //_DOMBodyElement.appendChild(_DOMFocusElement); | |
| // Create Native Pasteboard handler. | |
| _DOMPasteboardElement = theDocument.createElement("textarea"); | |
| @@ -251,7 +251,7 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop]; | |
| _DOMPasteboardElement.style.zIndex = "999"; | |
| _DOMPasteboardElement.className = "cpdontremove"; | |
| - _DOMBodyElement.appendChild(_DOMPasteboardElement); | |
| + //_DOMBodyElement.appendChild(_DOMPasteboardElement); | |
| // Make sure the pastboard element is blurred. | |
| _DOMPasteboardElement.blur(); | |
| @@ -259,6 +259,7 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop]; | |
| - (void)registerDOMWindow | |
| { | |
| +return; | |
| var theDocument = _DOMWindow.document; | |
| _DOMBodyElement = theDocument.getElementById("cappuccino-body") || theDocument.body; | |
| @@ -453,7 +454,7 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop]; | |
| [self registerDOMWindow]; | |
| - _DOMBodyElement.style.cursor = [[CPCursor currentCursor] _cssString]; | |
| + //_DOMBodyElement.style.cursor = [[CPCursor currentCursor] _cssString]; | |
| } | |
| - (void)orderOut:(id)aSender | |
| @@ -1139,7 +1140,7 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop]; | |
| [_windowLevels insertObject:aLevel atIndex:_windowLevels[middle] > aLevel ? middle : middle + 1]; | |
| layer._DOMElement.style.zIndex = aLevel; | |
| - _DOMBodyElement.appendChild(layer._DOMElement); | |
| + //_DOMBodyElement.appendChild(layer._DOMElement); | |
| } | |
| return layer; | |
| @@ -1172,7 +1173,7 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop]; | |
| { | |
| var layer = [layers objectForKey:levels[levelCount]]; | |
| - _DOMBodyElement.removeChild(layer._DOMElement); | |
| + //_DOMBodyElement.removeChild(layer._DOMElement); | |
| } | |
| } | |
| @@ -1186,7 +1187,7 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop]; | |
| { | |
| var layer = [layers objectForKey:levels[levelCount]]; | |
| - _DOMBodyElement.appendChild(layer._DOMElement); | |
| + //_DOMBodyElement.appendChild(layer._DOMElement); | |
| } | |
| } | |
| diff --git a/AppKit/Themes/Aristo/ThemeDescriptors.j b/AppKit/Themes/Aristo/ThemeDescriptors.j | |
| index d709b21..1037236 100644 | |
| --- a/AppKit/Themes/Aristo/ThemeDescriptors.j | |
| +++ b/AppKit/Themes/Aristo/ThemeDescriptors.j | |
| @@ -18,7 +18,7 @@ | |
| { | |
| return @"Aristo"; | |
| } | |
| - | |
| +/* | |
| + (CPButton)button | |
| { | |
| var button = [[CPButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 60.0, 24.0)], | |
| @@ -734,9 +734,10 @@ | |
| return buttonBar; | |
| } | |
| +//*/ | |
| @end | |
| - | |
| +//* | |
| @implementation AristoHUDThemeDescriptor : BKThemeDescriptor | |
| { | |
| } | |
| @@ -753,7 +754,10 @@ | |
| + (CPButton)themedButton | |
| { | |
| - var button = [[CPButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 60.0, 20.0)], | |
| + var button = [[CPButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 60.0, 20.0)]; | |
| + | |
| + [button setValue:[CPFont systemFontOfSize:11.0] forThemeAttribute:@"font" inState:CPThemeStateBordered]; | |
| +return button; | |
| bezelColor = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices: | |
| [ | |
| @@ -772,13 +776,13 @@ | |
| isVertical:NO]]; | |
| [button setTitle:@"Cancel"]; | |
| - | |
| [button setValue:[CPFont systemFontOfSize:11.0] forThemeAttribute:@"font" inState:CPThemeStateBordered]; | |
| [button setValue:[CPColor whiteColor] forThemeAttribute:@"text-color"]; | |
| [button setValue:CPLineBreakByTruncatingTail forThemeAttribute:@"line-break-mode"]; | |
| [button setValue:bezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateBordered]; | |
| - [button setValue:highlightedBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateBordered|CPThemeStateHighlighted]; | |
| + //[button setValue:highlightedBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateBordered|CPThemeStateHighlighted]; | |
| + | |
| [button setValue:CGInsetMake(2.0, 5.0, 4.0, 5.0) forThemeAttribute:@"content-inset" inState:CPThemeStateBordered]; | |
| [button setValue:CGSizeMake(0.0, 20.0) forThemeAttribute:@"min-size"]; | |
| @@ -786,7 +790,7 @@ | |
| return button; | |
| } | |
| - | |
| +/* | |
| + (CPScroller)themedVerticalScroller | |
| { | |
| var scroller = [[CPScroller alloc] initWithFrame:CGRectMake(0.0, 0.0, 15.0, 170.0)], | |
| @@ -826,14 +830,6 @@ | |
| ] | |
| isVertical:YES]); | |
| - /*var knobDisabledColor = PatternColor([[CPThreePartImage alloc] initWithImageSlices: | |
| - [ | |
| - [_CPCibCustomResource imageResourceWithName:"HUD/scroller-vertical-knob-disabled-top.png" size:CGSizeMake(15.0, 10.0)], | |
| - [_CPCibCustomResource imageResourceWithName:"HUD/scroller-vertical-knob-disabled-center.png" size:CGSizeMake(15.0, 1.0)], | |
| - [_CPCibCustomResource imageResourceWithName:"HUD/scroller-vertical-knob-disabled-bottom.png" size:CGSizeMake(15.0, 10.0)] | |
| - ] | |
| - isVertical:YES]);*/ | |
| - | |
| [scroller setValue:knobColor forThemeAttribute:@"knob-color" inState:CPThemeStateVertical]; | |
| //[scroller setValue:knobDisabledColor forThemeAttribute:@"knob-color" inState:CPThemeStateVertical|CPThemeStateDisabled]; | |
| @@ -882,13 +878,6 @@ | |
| ] | |
| isVertical:NO]); | |
| - /*var knobDisabledColor = PatternColor([[CPThreePartImage alloc] initWithImageSlices: | |
| - [ | |
| - [_CPCibCustomResource imageResourceWithName:"HUD/scroller-horizontal-knob-disabled-left.png" size:CGSizeMake(10.0, 15.0)], | |
| - [_CPCibCustomResource imageResourceWithName:"HUD/scroller-horizontal-knob-disabled-center.png" size:CGSizeMake(1.0, 15.0)], | |
| - [_CPCibCustomResource imageResourceWithName:"HUD/scroller-horizontal-knob-disabled-right.png" size:CGSizeMake(10.0, 15.0)] | |
| - ] | |
| - isVertical:NO]);*/ | |
| [scroller setValue:knobColor forThemeAttribute:@"knob-color"]; | |
| //[scroller setValue:knobDisabledColor forThemeAttribute:@"knob-color" inState:CPThemeStateDisabled]; | |
| @@ -898,8 +887,10 @@ | |
| return scroller; | |
| } | |
| +*/ | |
| @end | |
| +//*/ | |
| function PatternColor(anImage) | |
| { | |
| diff --git a/Foundation/CPKeyedUnarchiver.j b/Foundation/CPKeyedUnarchiver.j | |
| index 2a30e82..5b0d9bb 100644 | |
| --- a/Foundation/CPKeyedUnarchiver.j | |
| +++ b/Foundation/CPKeyedUnarchiver.j | |
| @@ -302,16 +302,31 @@ var _CPKeyedUnarchiverArrayClass = Ni | |
| @param aKey the object's associated key | |
| @return the decoded object | |
| */ | |
| + | |
| - (id)decodeObjectForKey:(CPString)aKey | |
| -{ | |
| +{ | |
| + PUSH("decode object for key: "+aKey); | |
| var object = [_plistObject objectForKey:aKey]; | |
| - | |
| - if ([object isKindOfClass:_CPKeyedUnarchiverDictionaryClass]) | |
| - return _CPKeyedUnarchiverDecodeObjectAtIndex(self, [object objectForKey:_CPKeyedArchiverUIDKey]); | |
| +//if (window.SECONDARY) { console.log(object + " " + (typeof object)) }; | |
| + if (window.SECONDARY || [object isKindOfClass:_CPKeyedUnarchiverDictionaryClass]) | |
| + { | |
| + if (window.SECONDARY) | |
| + { | |
| + window.THIRD= true; | |
| + [object isKindOfClass:_CPKeyedUnarchiverDictionaryClass]; | |
| + window.THIRD=false; | |
| + return NO;} | |
| + var val = _CPKeyedUnarchiverDecodeObjectAtIndex(self, [object objectForKey:_CPKeyedArchiverUIDKey]); | |
| + POP(); | |
| + return val; | |
| + } | |
| + | |
| else if ([object isKindOfClass:_CPKeyedUnarchiverNumberClass] || [object isKindOfClass:_CPKeyedUnarchiverDataClass] || [object isKindOfClass:_CPKeyedUnarchiverStringClass]) | |
| + { | |
| + POP(); | |
| return object; | |
| - | |
| + } | |
| else if ([object isKindOfClass:_CPKeyedUnarchiverArrayClass]) | |
| { | |
| var index = 0, | |
| @@ -320,12 +335,13 @@ var _CPKeyedUnarchiverArrayClass = Ni | |
| for (; index < count; ++index) | |
| array[index] = _CPKeyedUnarchiverDecodeObjectAtIndex(self, [object[index] objectForKey:_CPKeyedArchiverUIDKey]); | |
| - | |
| + POP(); | |
| return array; | |
| } | |
| /* else | |
| CPLog([object className] + " " + object + " " + aKey + " " + [_plistObject description]);*/ | |
| - | |
| + POP(); | |
| + | |
| return nil; | |
| } | |
| @@ -409,16 +425,45 @@ var _CPKeyedUnarchiverArrayClass = Ni | |
| @end | |
| +var messages = [], | |
| + stack = []; | |
| +PUSH = function(msg) | |
| +{ | |
| + messages.push(msg); | |
| + stack.push(msg); | |
| + if (stack.length > 1000) | |
| + console.log("WARN: "+stack.length); | |
| +} | |
| +POP = function() | |
| +{ | |
| + stack.pop(); | |
| +} | |
| +PRINT = function(n) | |
| +{ | |
| + console.log(messages.slice(messages.length - n).join("\n")); | |
| +} | |
| +TRACE = function(n) | |
| +{ | |
| + console.log(stack.slice(stack.length - n).join("\n")); | |
| +} | |
| +COUNT = function() | |
| +{ | |
| + console.log("stack: "+stack.length); | |
| +} | |
| + | |
| var _CPKeyedUnarchiverDecodeObjectAtIndex = function(self, anIndex) | |
| { | |
| + PUSH("decode object at index: "+anIndex); | |
| var object = self._objects[anIndex]; | |
| if (object) | |
| + { | |
| + POP(); | |
| if (object == self._objects[0]) | |
| return nil; | |
| else | |
| return object; | |
| - | |
| + } | |
| var object, | |
| plistObject = self._plistObjects[anIndex]; | |
| @@ -452,7 +497,7 @@ var _CPKeyedUnarchiverDecodeObjectAtIndex = function(self, anIndex) | |
| self._plistObject = savedPlistObject; | |
| - if (processedObject != object) | |
| + if (processedObject !== object) | |
| { | |
| if (self._delegateSelectors & _CPKeyedUnarchiverWillReplaceObjectWithObjectSelector) | |
| [self._delegate unarchiver:self willReplaceObject:object withObject:processedObject]; | |
| @@ -463,7 +508,7 @@ var _CPKeyedUnarchiverDecodeObjectAtIndex = function(self, anIndex) | |
| processedObject = [object awakeAfterUsingCoder:self]; | |
| - if (processedObject != object) | |
| + if (processedObject !== object) | |
| { | |
| if (self._delegateSelectors & _CPKeyedUnarchiverWillReplaceObjectWithObjectSelector) | |
| [self._delegate unarchiver:self willReplaceObject:object withObject:processedObject]; | |
| @@ -477,7 +522,7 @@ var _CPKeyedUnarchiverDecodeObjectAtIndex = function(self, anIndex) | |
| if (self._delegateSelectors & _CPKeyedUnarchiverDidDecodeObjectSelector) | |
| processedObject = [self._delegate unarchiver:self didDecodeObject:object]; | |
| - if (processedObject != object) | |
| + if (processedObject !== object) | |
| { | |
| if (self._delegateSelectors & _CPKeyedUnarchiverWillReplaceObjectWithObjectSelector) | |
| [self._delegate unarchiver:self willReplaceObject:object withObject:processedObject]; | |
| @@ -496,7 +541,7 @@ var _CPKeyedUnarchiverDecodeObjectAtIndex = function(self, anIndex) | |
| if (object == _CPKeyedArchiverNullString) | |
| { | |
| self._objects[anIndex] = self._objects[0]; | |
| - | |
| + POP(); | |
| return nil; | |
| } | |
| else | |
| @@ -508,7 +553,7 @@ var _CPKeyedUnarchiverDecodeObjectAtIndex = function(self, anIndex) | |
| // that it is a wrapper for a primitive JavaScript object. | |
| if ([object isMemberOfClass:_CPKeyedUnarchiverArchiverValueClass]) | |
| object = [object JSObject]; | |
| - | |
| + POP(); | |
| return object; | |
| } | |
| diff --git a/Foundation/CPObject.j b/Foundation/CPObject.j | |
| index f4c6191..34d326c 100644 | |
| --- a/Foundation/CPObject.j | |
| +++ b/Foundation/CPObject.j | |
| @@ -177,8 +177,8 @@ CPLog(@"Got some class: %@", inst); | |
| @param aClass the class to test as the receiver's class or super class. | |
| */ | |
| - (BOOL)isKindOfClass:(Class)aClass | |
| -{ | |
| - return [isa isSubclassOfClass:aClass]; | |
| +{try{if (window.THIRD) { window.FOURTH=true; return objj_msgSend(nil, ""); } | |
| + return [isa isSubclassOfClass:aClass];}finally{window.FOURTH=false;} | |
| } | |
| + (BOOL)isKindOfClass:(Class)aClass | |
| @@ -529,9 +529,9 @@ CPLog(@"Got some class: %@", inst); | |
| // override toString on Objective-J objects so we get the actual description of the object | |
| // when coerced to a string, instead of "[Object object]" | |
| objj_class.prototype.toString = objj_object.prototype.toString = function() | |
| -{ | |
| - if (this.isa && class_getInstanceMethod(this.isa, "description") != NULL) | |
| - return [this description] | |
| +{return ""; | |
| + if (this.isa && class_getInstanceMethod(this.isa, "description")) | |
| + return [this description]; | |
| else | |
| return String(this) + " (-description not implemented)"; | |
| } | |
| diff --git a/Objective-J/CFBundle.js b/Objective-J/CFBundle.js | |
| index 12a0a14..5e308b0 100644 | |
| --- a/Objective-J/CFBundle.js | |
| +++ b/Objective-J/CFBundle.js | |
| @@ -518,7 +518,7 @@ CFBundle.prototype.removeEventListener = function(/*String*/ anEventName, /*Func | |
| CFBundle.prototype.onerror = function(/*Event*/ anEvent) | |
| { | |
| - throw anEvent.error; | |
| + //throw anEvent.error; | |
| } | |
| exports.CFBundle = CFBundle; | |
| diff --git a/Objective-J/CFDictionary.js b/Objective-J/CFDictionary.js | |
| index a0d4925..00958d3 100644 | |
| --- a/Objective-J/CFDictionary.js | |
| +++ b/Objective-J/CFDictionary.js | |
| @@ -99,7 +99,7 @@ CFDictionary.prototype.valueForKey = function(/*String*/ aKey) | |
| } | |
| CFDictionary.prototype.toString = function() | |
| -{ | |
| +{return ""; // STRLEN | |
| var string = "{\n", | |
| keys = this._keys, | |
| index = 0, | |
| diff --git a/Objective-J/Runtime.js b/Objective-J/Runtime.js | |
| index d5cf526..552e8f5 100644 | |
| --- a/Objective-J/Runtime.js | |
| +++ b/Objective-J/Runtime.js | |
| @@ -453,22 +453,34 @@ function ivar_getTypeEncoding(anIvar) | |
| } | |
| // Sending Messages | |
| +var objj_stack = 0, | |
| + objj_max = 0;; | |
| function objj_msgSend(/*id*/ aReceiver, /*SEL*/ aSelector) | |
| -{ | |
| +{if (window.FOURTH) { debugger; return YES;} | |
| if (aReceiver == nil) | |
| return nil; | |
| - | |
| + | |
| +objj_stack += 2; | |
| +if (objj_stack > 100) | |
| +{ | |
| + console.log("OBJJ_WARN: "+objj_stack); | |
| + objj_max = MAX(objj_max, objj_stack); | |
| +} | |
| CLASS_GET_METHOD_IMPLEMENTATION(var implementation, aReceiver.isa, aSelector); | |
| - switch(arguments.length) | |
| + /*switch(arguments.length) | |
| { | |
| case 2: return implementation(aReceiver, aSelector); | |
| case 3: return implementation(aReceiver, aSelector, arguments[2]); | |
| case 4: return implementation(aReceiver, aSelector, arguments[2], arguments[3]); | |
| - } | |
| + }*/ | |
| + | |
| + var result = implementation.apply(aReceiver, arguments); | |
| + | |
| +objj_stack -=2; | |
| - return implementation.apply(aReceiver, arguments); | |
| + return result; | |
| } | |
| function objj_msgSendSuper(/*id*/ aSuper, /*SEL*/ aSelector) | |
| diff --git a/Tools/Documentation/Cappuccino.doxygen b/Tools/Documentation/Cappuccino.doxygen | |
| index 0f531d5..db0a232 100644 | |
| --- a/Tools/Documentation/Cappuccino.doxygen | |
| +++ b/Tools/Documentation/Cappuccino.doxygen | |
| @@ -608,7 +608,7 @@ FILE_PATTERNS = *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i+ | |
| # should be searched for input files as well. Possible values are YES and NO. | |
| # If left blank NO is used. | |
| -RECURSIVE = NO | |
| +RECURSIVE = YES | |
| # The EXCLUDE tag can be used to specify files and/or directories that should | |
| # excluded from the INPUT source files. This way you can easily exclude a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment