cacaodev and Ross Boucher
678563a970
Accidental globals in CPNotificationCenter and Runtime.js
2010-10-18 10:15:40 -07:00
Alexander Ljungberg
6b37bae2c2
Fixed: removed the previous CPTimer DOM check - it doesn't work in Foundation.
2010-10-15 16:03:00 -03:00
Alexander Ljungberg
612e8c3f0b
Add DOM checks to CPTimer's window.setTimeout bridge code.
2010-10-14 20:20:20 -03:00
Brian Donovan and Ross Boucher
b5d0054f94
-[CPIndexSet shiftIndexesStartingAtIndex:by:] did not properly adjust count.
...
When clipping a range (i.e. some or all of it went below the lower bound) as a result of
calling shiftIndexesStartingAtIndex:by: with a negative delta, the CPIndexSet did not adjust
the index count, which caused calls to -lastIndex to fail.
This caused -[CPArrayController removeObject:] to fail when the object removed was at index 0.
2010-10-13 18:20:20 -07:00
Alexander Ljungberg
e62af384ea
Merge branch 'fix-imports' of http://github.com/paulbaumgart/cappuccino into paulbaumgart-fix-imports
2010-10-09 21:32:58 -04:00
Klaas Pieter Annema
5074938437
implement KVO dependent key path support
2010-10-07 21:17:28 +02:00
Klaas Pieter Annema
5b82417698
Merge branch 'CPKeyValueObservingOptionInitial-fix' of http://github.com/eventualbuddha/cappuccino into eventualbuddha-CPKeyValueObservingOptionInitial-fix
2010-10-07 10:37:50 +02:00
Ross Boucher
ff2aa51a68
Fix accidental global in CPObject.
2010-10-06 19:41:45 -07:00
Paul Baumgart
01852d8075
Fix a bunch of missing @imports.
...
All classes (excluding the ones prefixed with underscores) in Foundation
and AppKit can now be loaded individually except CPOpenPanel and
CPSavePanel. These two classes have some sort of dependency cycle
that seems impossible to resolve without forward declarations (which
we don't have).
2010-10-05 15:54:25 -07:00
Brian Donovan
0ce115bc9c
Ensure observeValueForKeyPath:ofObject:change:context is called consistently.
...
During the "normal" callback for new and old values, the ofObject:
parameter passed to the observer is the original receiver of the
addObserver:forKeyPath:options:context: call, but that isn't the case
with the call caused by the CPKeyValueObservingOptionInitial option.
This commit uses _targetObject, the receiver of the addObserver:...
call, rather than self, the _CPKVOProxy.
2010-10-05 07:45:43 -07:00
Paul Baumgart
ca2ae22f15
Fix non-ASCII characters in CPDictionary.j and CPFormatter.j
2010-09-29 18:21:10 -07:00
Ross Boucher
32a0e950fe
Allow comparators to return any value > 1 to indicate CPOrderedDescending.
2010-09-28 16:46:39 +05:30
Francisco Ryan Tolmasky I
d3c86aeefd
Cleanup for previous undo patch and added a few test cases.
...
Reviewed by me.
2010-09-18 21:47:43 -07:00
Blair Duncan and Francisco Ryan Tolmasky I
212feff636
CPUndoManager -added support for setActionName to enable the undo/redo menu to automatically update with the value passed as the action name. Test file included.
2010-09-18 20:30:43 -07:00
Alexander Ljungberg
7692f80f64
Additional fixes of inadvertent globals.
2010-09-17 16:48:00 -04:00
Nicholas Small
d59d141302
Fix a bool that's supposed to be an int in CPUndoManager -groupingLevel.
2010-09-16 13:26:17 -04:00
Tom Robinson
1220555936
Fix for CPProxy not returning the return value
2010-09-13 16:44:45 -07:00
Alexander Ljungberg
4e4cc65645
Style and whitespace cleanup.
2010-09-10 19:07:48 -04:00
Arkadiusz Młynarczyk and Alexander Ljungberg
ddfac8d717
- moved componentsSeparatedByCharactersInSet: into CPCharacterSetAdditions CPString category
...
- added tests for componentsSeparatedByCharactersInSet:
- ensured Cocoa compatibility of componentsSeparatedByCharactersInSet:
- added new test for CPString boolValue
- fixed CPString boolValue (" ++01" should return NO as in Cocoa, previously it returned YES)
2010-09-10 18:58:18 -04:00
Arkadiusz Młynarczyk and Alexander Ljungberg
009683ddd4
- Exception raising in componentsSeparatedByCharactersInSet: when separator parameter is nil
...
- Added support for edge cases (string is empty or string doesn't contain characters from separator set).
2010-09-10 18:58:10 -04:00
Arkadiusz Młynarczyk and Alexander Ljungberg
8eefb90944
- implemented componentsSeparatedByCharactersInSet:
2010-09-10 18:58:02 -04:00
Klaas Pieter Annema
2dd1a1b54d
always return a boolean from CPKeyedUnarchiver decodeBoolForKey:
2010-09-08 13:28:40 +02:00
Klaas Pieter Annema
213fde04fe
fix CPArray+KVO addObjects inserting objects at beginning of array one by one
2010-08-27 12:06:40 +02:00
Klaas Pieter Annema
ddad10b615
fix CPPredicate predicateWithFormat: throwing exception (in WebKit)
...
I believe the exception was caused because WebKit thought arguments was the function.Arguments.
Issue was resolved by renaming the local arguments variable to args
2010-08-26 16:55:05 +02:00
Klaas Pieter Annema
b21eab1bf1
Improved KVC mutable indexed accessors
...
Refactored everything away into insertObjects:atIndexes: so all the logic is in the same place
and made it so that the _insertManySEL is the preferred selector to use. If it doesn't exist it will fall back to the _insertSEL.
2010-08-25 15:50:24 +02:00
Alexander Ljungberg
febdf4092e
New implementation of change notifications from CPArrayController.
...
It is crucial that we send notification only before and after complete changes. In the middle notifications might cause observers to see or react to inconsistent data (e.g. selection indexes pointing to rows no longer present). Added some unit tests - more might be needed in the future. Fixed: before and after values when observing array controller key paths during content changes or rearranges were wrong. Fixed: the array controller sent out multiple redundant change notifications.
2010-08-23 18:53:29 -04:00
Tom Robinson
4eaf560ee6
Fixes two bugs in compareObjectsUsingDescriptors causing test to fail: extra semi-colon after while() and uninitized "result" variable.
...
The former masked the latter when a single sort descriptor was used.
2010-08-13 15:34:28 -07:00
Alexander Ljungberg
6afe22f351
Merge remote branch 'klaaspieter/fix/784-cparraycontroller-selection'
2010-08-13 14:00:27 -04:00
Randall Luecke
22c481ff27
Implemented allKeysForObject: in CPDictionary with tests.
2010-08-12 14:18:45 -05:00
Randall Luecke
14fb769582
Removed ambiguity in CPDictionary keys type. Closes #700
2010-08-12 13:29:17 -05:00
Randall Luecke
dd9c085ae3
Fix for new sort being unstable with a huge thanks to Shon Frazier. Reviewed by Me and Alexander Ljungberg.
2010-08-11 22:33:14 -05:00
cacaodev and Randall Luecke
b7d1dfa75f
CPArray sorting: improve performance by 40% (JSC) replacing native js sort() with the merge-sort algorithm.
...
Test with ojunit CPArrayPerformance.j
2010-08-10 18:16:03 -05:00
Alexander Ljungberg
271bb00147
Marginally faster filter and sort in CPArrayController's arrangeObjects (4% in the performance tester.) Reduced memory usage when both a filter and a sort order are applied. Cleanup of the tester and a filter only test run.
2010-08-09 17:31:36 -04:00
cacaodev and Alexander Ljungberg
750cd3c258
CPComparisonPredicate :
...
Fixed a bug where *lhs custom_selector: nil* was always returning false.
Test nil on left and/or right with some operators.
2010-08-05 16:18:18 -04:00
Alexander Ljungberg
df358ccc42
Fix failing CPPredicate unit tests: comment out test for unimplemented expressionForSubquery, finish CPExpression_unionset and fix typo in CPExpression expressionForIntersectSet.
2010-08-04 21:27:01 -04:00
Alexander Ljungberg
63dfb8a227
CPPredicate optimization: early out in failing AND expression.
2010-08-04 20:50:36 -04:00
Alexander Ljungberg
a3c0590218
Fixed with CPPredicate: [CPArray arrayWithObjects:...] should no longer be terminated with a nil in Cappuccino.
2010-08-04 20:50:07 -04:00
cacaodev and Alexander Ljungberg
c694c96a32
CPPredicate & co style cleaning
2010-08-04 20:45:06 -04:00
Alexander Ljungberg
30bc304a20
Whitespace and style fixes.
2010-08-04 20:23:35 -04:00
cacaodev and Alexander Ljungberg
974cf64e1d
CPPredicate &al implementation. OJUnit test.
2010-08-04 19:53:44 -04:00
cacaodev and Alexander Ljungberg
fce726a031
CPScanner implementation
2010-08-04 19:48:51 -04:00
cacaodev and Alexander Ljungberg
7187ba3074
CPCharacterSet implementation
2010-08-04 19:48:27 -04:00
cacaodev and Alexander Ljungberg
bfbf8fb841
Support for diacritics aware strings comparison
2010-08-04 19:48:06 -04:00
Alexander Ljungberg
4ea0d4d043
CPNull is equal to CPNull. Unit test included.
2010-08-04 16:43:04 -04:00
Aparajita Fishman and Ross Boucher
3eea14abe4
For the methods that don't have context: in their signature, the predicate will receive undefined in the context parameter instead of nil.
2010-07-29 14:08:04 -07:00
Francisco Ryan Tolmasky I
cea663f4eb
Fix for isEqual: not being implemented in CPIndexSet.
...
Closes #785 .
Reviewed by rossco.
2010-07-28 16:17:54 -07:00
Aparajita Fishman and Ross Boucher
8ecac8d03c
Fix and test case for issue #746
2010-07-28 16:12:02 -07:00
Aparajita Fishman and Ross Boucher
cb7f60aba8
Added -indexOfObjectPassingTest: and related methods
2010-07-28 15:57:47 -07:00
Ross Boucher
b4dbe422ff
Revert to addObject if there are no sort descriptors in insert...sortedby.
...
Closes #764 .
2010-07-28 15:48:25 -07:00
Klaas Pieter Annema
b9c2becd3e
implement CPIndexSet isEqual:
2010-07-27 09:09:59 +02:00