Files
cappuccino/Tests/Foundation
David Richardson 021e9935aa Foundation: Add CPProgress and cancellable item provider loading
Partial implementation, gaps and impossibilities noted internally as TODO comments.

* CPProgress.j: Introduce CPProgress, modelled on NSProgress.
  - Count units of work, with fraction completed, finished and indeterminate states.
  - Compose progress trees through explicit children and the current progress object.
  - Cancel, pause and resume, with handlers, propagating to children.
  - Announce unit-count changes through key-value observing across the tree.

* CPError.j: Add CPUserCancelledError.

* CPItemProvider.j:
  - Return a CPProgress from each load, counting bytes read for files and aborting the read on cancellation.
  - Pass file contents to CPData as a binary string rather than a byte array.
  - Implement -canLoadObjectOfClass: and -loadObjectOfClass:completionHandler:.
  - Add the CPString (CPItemProvider) reading category.

* CPString+Encoding.j: Decode data held as a binary string through a Uint8Array, without building a byte array.

* Foundation.j: Import CPProgress.j.

* CPProgressTest.j: Add unit tests covering counts, children, the current progress object, cancellation, pausing, observation and user information.

* CPItemProviderTest.j: Add unit tests covering read progress, cancellation, completion and string loading.
2026-11-02 15:29:21 -06:00
..
2020-07-13 20:37:52 +02:00
2015-02-26 22:07:15 -05:00
2010-12-02 11:44:42 -08:00
2014-11-01 09:26:37 -04:00
2013-01-24 00:08:47 +00:00
2013-01-24 09:01:54 +08:00
2011-05-04 19:07:06 +02:00
2015-02-03 16:46:49 -08:00
2012-03-12 20:14:11 +00:00
2026-04-03 13:33:06 +02:00
2014-12-16 21:43:19 +01:00
2010-11-13 02:29:04 +01:00
2013-01-19 02:11:37 +00:00