From 7e352676c9112d44adf9f3013ba4dd98c770c2f1 Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Tue, 18 Nov 2008 18:10:28 -0800 Subject: [PATCH 1/3] nib2cib null _superview bug fix --- Tools/nib2cib/NSNibConnector.j | 6 +++--- Tools/nib2cib/NSView.j | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Tools/nib2cib/NSNibConnector.j b/Tools/nib2cib/NSNibConnector.j index 7216286e4..40ace7d2e 100644 --- a/Tools/nib2cib/NSNibConnector.j +++ b/Tools/nib2cib/NSNibConnector.j @@ -49,7 +49,7 @@ - (id)initWithCoder:(CPCoder)aCoder { - return [[_CPCibConnector alloc] NS_initWithCoder:aCoder]; + return [self NS_initWithCoder:aCoder]; } - (Class)classForKeyedArchiver @@ -65,7 +65,7 @@ - (id)initWithCoder:(CPCoder)aCoder { - return [[_CPCibControlConnector alloc] NS_initWithCoder:aCoder]; + return [self NS_initWithCoder:aCoder]; } - (Class)classForKeyedArchiver @@ -81,7 +81,7 @@ - (id)initWithCoder:(CPCoder)aCoder { - return [[_CPCibOutletConnector alloc] NS_initWithCoder:aCoder]; + return [self NS_initWithCoder:aCoder]; } - (Class)classForKeyedArchiver diff --git a/Tools/nib2cib/NSView.j b/Tools/nib2cib/NSView.j index 2c54fbf14..dab3c6b88 100644 --- a/Tools/nib2cib/NSView.j +++ b/Tools/nib2cib/NSView.j @@ -90,7 +90,7 @@ - (id)initWithCoder:(CPCoder)aCoder { - return [[CPView alloc] NS_initWithCoder:aCoder]; + return [self NS_initWithCoder:aCoder]; } - (Class)classForKeyedArchiver From 9321084d8408abf108119cbaa89463c06f1a025e Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Tue, 18 Nov 2008 18:11:09 -0800 Subject: [PATCH 2/3] CPTimer semicolon/comma typo --- Foundation/CPTimer.j | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Foundation/CPTimer.j b/Foundation/CPTimer.j index 3aa13dc45..d71d19345 100644 --- a/Foundation/CPTimer.j +++ b/Foundation/CPTimer.j @@ -239,7 +239,7 @@ var CPTimersTimeoutID = 1000, var _CPTimerBridgeTimer = function(codeOrFunction, aDelay, shouldRepeat, functionArgs) { - var timeoutID = CPTimersTimeoutID++; + var timeoutID = CPTimersTimeoutID++, theFunction = nil; if (typeof codeOrFunction === "string") @@ -249,7 +249,7 @@ var _CPTimerBridgeTimer = function(codeOrFunction, aDelay, shouldRepeat, functio if (!functionArgs) functionArgs = []; - theFunction = function() { codeOrFunction.apply(window, functionArgs); CPTimersForTimeoutIDs[timeoutID] = nil;} + theFunction = function() { codeOrFunction.apply(window, functionArgs); CPTimersForTimeoutIDs[timeoutID] = nil; } } CPTimersForTimeoutIDs[timeoutID] = [CPTimer scheduledTimerWithTimeInterval:aDelay / 1000 callback:theFunction repeats:shouldRepeat]; From 3b65f460d68d1dde50c55bf10410e532b6a30a1c Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Tue, 18 Nov 2008 19:28:55 -0800 Subject: [PATCH 3/3] Simplified stringWithHash --- Foundation/CPString.j | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Foundation/CPString.j b/Foundation/CPString.j index f72f6af15..c7468c685 100644 --- a/Foundation/CPString.j +++ b/Foundation/CPString.j @@ -90,10 +90,7 @@ var CPStringHashes = new objj_dictionary(); */ + (id)stringWithHash:(unsigned)aHash { - var zeros = "000000", - digits = aHash.toString(16); - - return zeros.substring(0, zeros.length - digits.length) + digits; + return sprintf("%06x", aHash); } /*!