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
Klaas Pieter Annema and Ross Boucher
d947c849c8
made _accessorForKey slightly faster by inlining it as a function
2010-07-26 22:48:40 -07:00
Klaas Pieter Annema and Ross Boucher
8ce63a244c
store accessors in a javascript object not a CPDictionary, for slight performance improvement
2010-07-26 22:48:39 -07:00
Klaas Pieter Annema and Ross Boucher
ff8e5ae42e
save _replacedKeys on the class in stead of the object instance
...
reviewed: Ross
2010-07-26 22:48:39 -07:00
Ross Boucher
709a9b3c61
Merge remote branch 'klaaspieter/fix-758-cpdate-isequal'
2010-07-21 15:04:10 -07:00
Ross Boucher
c35621b669
Merge remote branch 'klaaspieter/fix-756-cpstring-isequal'
2010-07-21 15:03:43 -07:00
Klaas Pieter Annema
2ae8d25d18
don't use === for date equality checking
...
Apparently this will return false for equal dates, reverted the actual equality check to what was already in Cappuccino before my fix !(date < otherDate || date > otherDate)
2010-07-19 13:10:15 +02:00
Klaas Pieter Annema
564668587c
fix CPDate isEqual: and isEqualToDate:
2010-07-15 14:42:48 +02:00
Klaas Pieter Annema
023cf46041
check for nil in CPString isEqual:
2010-07-15 14:39:24 +02:00
Klaas Pieter Annema
36bb41a945
implemented isEqual: on CPString
2010-07-15 12:49:52 +02:00
Randall Luecke
7696b30067
Added tests for CPFormatter and Foundation import.
2010-07-11 16:57:17 -05:00
Randall Luecke
2a4d3507b8
Implementation fix for CPFormatter to conform to documentation.
2010-07-07 19:49:16 -05:00
Randall Luecke
a34dfee752
CPFormatter implementation.
2010-07-06 22:43:30 -05:00
Nicholas Small
f34775b038
CPAttributedString should not call its own -beginEditing or -endEditing.
2010-06-29 14:02:37 -04:00
Andreas and Ross Boucher
a6b7d456f4
Add isLoaded to CFBundle and CPBundle
2010-06-23 20:11:05 -07:00
Alexander Ljungberg and Ross Boucher
f2c01cbbbd
In CPUndoManager, handle the edge cases if an object changes from being an Objective-J object to being just a JS object. Also handle the case where an Objective-J object could theoretically compare equal to nil - CPNull isEqual:.
2010-06-16 08:50:42 -07:00
Alexander Ljungberg and Ross Boucher
c807358216
Support non Objective-J objects in CPUndoManager's no-op check for auto undo.
2010-06-16 08:50:34 -07:00
Alexander Ljungberg and Ross Boucher
685c3c9853
Don't add no-ops to the undo stack when using automatic undo manager mode. This is necessary when used together with bindings since controls issue reverse binding updates whenever editing ends, which would add a 'do nothing' undo entry on the stack in cases where nothing changed.
2010-06-16 08:50:27 -07:00
Alexander Ljungberg and Ross Boucher
5c5412db67
Make didChangeValueForKey work even if willChangeValueForKey was not called.
2010-06-11 14:08:07 -07:00