Commit Graph
1051 Commits
Author SHA1 Message Date
Antoine Mercadal 007ca4c6b0 Merge pull request #2336 from cpasslack/cpasslack/corruptDecimalNumberAfterDecodingFix
Fixed: Encoding a [CPDecimalNumber zero] causes a corrupt CPDecimalNumbe...
2015-03-31 11:25:20 -07:00
Alexander Ljungberg 1925b7b324 Merge branch 'refs/heads/0.9.8' 2015-03-29 13:39:28 +01:00
Alexander Ljungberg c7770c37d0 New: throw an exception on nil CPDictionary keys and values.
Previously only a deprecation warning was issued. This warning was scheduled to be removed in Cappuccino 0.9.8, this release.
2015-03-29 13:02:55 +01:00
Christian Passlack bb9049bef4 Code-styling to match official style-guide. 2015-03-23 20:45:31 +01:00
Christian Passlack 43c0eda2be Fixed: Encoding a [CPDecimalNumber zero] causes a corrupt CPDecimalNumber after decoding
Previously, CPNumber and CPDecimalNumber shared the same method UID and CPNumberUIDs-Dictionary.
This leads to some unexpected errors for example a [CPDecimalNumber zero] which refers to itself after
decoding. CPDecimalNumber now overwrites the method UID and has its own UID-Dictionary.

Fixes #2332
2015-03-20 11:21:07 +01:00
william57m 471fbee090 Formatting: code readability and tests improved 2015-03-01 13:05:22 -05:00
william57m d66de937d9 Formatting: to pass capp_lint and to respect Cappuccino's standards 2015-02-28 20:53:32 -05:00
william57m b40f980c62 New: added the CPCache class 2015-02-26 22:07:15 -05:00
Alexandre Wilhelm 662bf83a88 Typo: type in _CPCollectionKVCOperators 2015-02-17 14:42:23 -08:00
Alexandre Wilhelm 8371ac5b0d New: added KVC operators unionOfObjects, distinctUnionOfObjects, unionOfArrays, distinctUnionOfArrays, distinctUnionOfSets
This PR adds the KVC operators unionOfObjects, distinctUnionOfObjects, unionOfArrays, distinctUnionOfArrays, distinctUnionOfSets for array and set.

Unit-Tests Tests/Foundation/CPKVCArrayTest.j
Unit-Tests Tests/Foundation/CPSetTest.j
2015-02-17 00:14:48 -08:00
Antoine Mercadal eb883bc51e Merge pull request #2272 from ahankinson/new-fixed-with-credentials-cpurl
Rework of withCredentials, CPURLRequest, and CPURLConnection
2015-01-14 11:51:14 -08:00
Alexandre Wilhelm 20eb59d9b6 Fixed: compiling warning for the class CPInvocation 2015-01-13 13:57:22 -08:00
Alexandre Wilhelm 31023a1a71 Fixed: warnings when compiling cappuccino
Previously, some warnings were raised when compiling Cappuccino.
2015-01-13 11:46:53 -08:00
Antoine Mercadal a3a3da309c Merge branch 'DateException' of https://github.com/Dogild/cappuccino into Dogild-DateException 2015-01-09 10:41:52 -08:00
Alexandre Wilhelm fa7b71cabe Fixed: cappuccino raised an exception when the param of constructor method of a CPDate are not a string. It now raises an warning 2015-01-09 08:37:29 -08:00
Antoine Mercadal d3490f6a2e Merge pull request #2243 from ahankinson/new-CFError-CPError
New: CFError and Updated CPError
2015-01-08 17:33:31 -08:00
cacaodev 873232d560 FIXED : a CPOperation marked as cancelled was never started (CPOperation -start) when managed in a queue.
FIXED : After an operation started, either from a queue or explicitely, its finished property was never set to true.

This was causing dependant operation to never be executed.
After this commit, cancelled operations are started (but not executed) and correctly marked as finished.

Tests: CPOperationQueueTest and CPOperationTest for an operation managed by a queue or run explicitely.
2014-12-16 18:43:08 +01:00
Andrew Hankinson 2a16fb5e09 Fixed: Properly initialize the _withCredentials variable in CPURLRequest 2014-12-04 18:11:38 -05:00
Andrew Hankinson c22cf71099 New: Added CPCopying protocol to CPURLRequest
Previously it was not possible to deep-copy a CPURLRequest, which meant that a CPURLConnection could not keep track of both the original and modified versions of a request.

This commit adds the copy method to CPURLRequest.
2014-12-04 18:11:10 -05:00
Andrew Hankinson c739718710 New: CPURLConnection now has the originalRequest and currentRequest methods
Previously, CPURLConnection did not implement the originalRequest and currentRequest methods (added to Cocoa in 10.8).

This commit adds this functionality.

NB: this is dependent on CPURLRequest having deep-copy capabilities to make a copy of the original request, which has been added in another commit on this pull request.
2014-12-04 18:08:54 -05:00
Andrew Hankinson d1917db47e Fixed: Reworked withCredentials for XMLHTTPRequests
Previously, the withCredentials parameter was accessed primarily through the CPURLConnection, which gave limited access to changing the request before it was sent off.

This commit removes withCredentials from CPURLConnection and places it on CPURLRequest so that it may be more easily modified prior to sending the request. This also simplifies the logic in CPURLConnection for creating and establishing connections with credentials.

In this commit, all CFHTTPRequests are assumed to not use withCredentials unless they are explicitly set. Setting [aURLRequest withCredentials] will set the withCredentials property on the underlying XMLHTTPRequest prior to the connection being opened.
2014-12-04 15:29:52 -05:00
Andrew Hankinson 8024f6a804 Fixed: Move CPURLRequest methods to @accessors
This commit changes the simple getters/setters from CPURLRequest to use @accessors.
2014-12-04 15:12:11 -05:00
Andrew Hankinson 526e0725d8 Merge branch 'new-CFError-CPError' of github.com:ahankinson/cappuccino into new-CFError-CPError 2014-12-02 12:51:25 -05:00
Andrew Hankinson 7e4e0567ef Merge branch 'refs/heads/master' into new-CFError-CPError 2014-12-02 12:51:14 -05:00
Antoine Mercadal b0a7fe4079 Merge branch 'master' into objj-typedef-and-ivar-checks
+ fixed new warnings from master

Conflicts:
	Foundation/CPNotificationCenter.j
2014-11-26 12:00:34 -08:00
Andrew Hankinson 6f6938deb7 Fixed: Updated Comment 2014-11-25 17:58:17 -05:00
Alexandre Wilhelm d481d9cca5 Fixed: added queue to the method addObserverForName:(CPString)aNotificationName object:(id)anObject queue:(id)queue usingBlock:(Function)block 2014-11-20 23:38:53 -08:00
Alexandre Wilhelm fe25dbd872 New: added method addObserverForName:object::usingBlock: in CPNotificationCenter
Previously, the method addObserverForName:object::usingBlock: didn't exist in Cappuccino.
Now it does.

To observe, you need to use the method - (id <CPObject>)addObserverForName:(CPString)aNotificationName object:(id)anObject usingBlock:(Function)block

To unregister observations, you pass the object returned by this method to removeObserver:. You must invoke removeObserver: or removeObserver:name:object:.

Test /Tests/Foundation/CPNotificationCenterTest.j

Fixed #2259
2014-11-20 15:24:23 -08:00
Andrew Hankinson de2e77cc86 Adding userInfo error keys and documenting CPURLError.j 2014-11-06 17:23:27 -05:00
Antoine Mercadal 45248bcb65 FIXED: ivars warning fixes 2014-11-06 12:17:58 -08:00
Antoine Mercadal f9275a70af FIXED: New warnings reveleaded by ivar type checking
This patch fixes all new warnings
2014-11-06 10:17:05 -08:00
Andrew Hankinson ef5d1d6e58 Fixed: Wrong method included on CPError 2014-11-01 09:27:12 -04:00
Andrew Hankinson 7811521c08 New: CPURLError definitions
This commit adds support for the CPURLError codes, with underlying support provided by Foundation's CFURL Errors.
2014-11-01 09:03:08 -04:00
Andrew Hankinson 96135c9875 New: Toll-free bridged CPError with CFError
This commit changes CPError to use a toll-free bridge with CFError, matching Cocoa's implementation of this class.
2014-11-01 09:01:42 -04:00
Andrew Hankinson 0399b3daed Fixed: Renamed CPCoder method to match language
Previously CPCoder had a method named "encodeValueOfObjCType" which is a misnomer.

This commit renames the method to "encodeValueOfObjJType."
2014-11-01 07:41:51 -04:00
Alexandre Wilhelm d5e811f9f1 Fixed: exception descriptions in CPDate did not countain all of the needed informations 2014-10-26 21:27:10 -07:00
Alexandre Wilhelm 6d3f430b24 Fixed: constructor of CPDate can take string param
Previously, when making a CPDate with some constructors, we could pass a string or nil to create a date. For example it was allowed to do var date = [CPDate dateWithTimeIntervalSince1970:"10"];

Now this is not possible anymore and it works like in Cocoa, only number are authorized.
2014-10-22 17:27:46 -07:00
Martin Carlberg 643566bbfd Honor options when creating KVO change dictionary 2014-10-09 19:27:57 +02:00
Sebastian Balay fa5fd1e71c Add support to diacritic insensitive search in CPString rangeOfString:options:range: method
When searching by range, the option of diacritic insensitive search was not being contemplated

Also add support to strip variants of 'E' 'I' 'O' 'U' that were not implemented.
Source: http://www.ascii-code.com/
2014-09-08 10:01:12 -03:00
ratijas 06240d1183 -setFloat:forKey: @selector(aValue) -> @selector(floatValue) 2014-09-03 16:08:21 +00:00
Alexander Ljungberg 58928a5000 Formatting: CPDateFormatter changes and tests.
Refs #2155.
2014-07-22 12:49:35 +01:00
Alexander Ljungberg 4c44ede945 Merge pull request #2155 from krodelin/CPDateFormatter-emptyLanguages
Fixed: CPDateFormatter now works for non-"en" locales [+1]
2014-07-22 12:41:03 +01:00
Antoine Mercadal 51440cc7f7 Merge branch 'FIXED--insertAttributedString-did-not-coalsece' of https://github.com/daboe01/cappuccino into daboe01-FIXED--insertAttributedString-did-not-coalsece 2014-07-10 11:38:37 -07:00
Antoine Mercadal 09f100c0c2 Merge branch 'fix-cfhttp-cpurl-2141-2138' of https://github.com/ahankinson/cappuccino into ahankinson-fix-cfhttp-cpurl-2141-2138 2014-07-09 15:45:28 -07:00
Udo Schneider 9119e08342 Fixed: CPDateFormatter now works for non-"en" locales
CPDateFormatter previously only defined symbols for "en"-locale. Using another locale simple yielded nil-results for most keys. This fix addresses this behavior by always returning the english symbols as default unless other symbols have been explicitly provided or set.
2014-07-01 00:26:51 +02:00
Andrew Hankinson 32657793c8 Formatting: CPURLConnection 2014-06-23 16:13:36 -04:00
Andrew Hankinson 63eb88c6ae Merge branch 'fix-cfhttp-cpurl-2141-2138' of github.com:ahankinson/cappuccino into fix-cfhttp-cpurl-2141-2138 2014-06-23 15:51:31 -04:00
Andrew Hankinson 28520cc493 Formatting: Cleaning up CPURLConnection
Removed some extra whitespace and added a newline at the end of the file.
2014-06-23 15:51:13 -04:00
Ryan Bannon 8be05b404c Fixed: change variable name
Changed "returnValue" to "connection" - more descriptive.

Ref: https://github.com/cappuccino/cappuccino/pull/2144#commitcomment-6769088
2014-06-23 15:47:40 -04:00
Ryan Bannon ba9eac3ea4 Working #2144: Reintegrated changes from #2138 and fixed test fail.
Now using instance variables for withCredentials.  Also fixed test failure.
2014-06-23 13:08:36 -04:00