lp://staging/~psmay/+junk/tree-maker.dev

Created by Peter S. May and last modified
Get this branch:
bzr branch lp://staging/~psmay/+junk/tree-maker.dev
Only Peter S. May can upload to this branch. If you are Peter S. May please log in for upload directions.

Related bugs

Related blueprints

Branch information

Owner:
Peter S. May
Status:
Development

Recent revisions

12. By Peter S. May <pmay@pmay-desktop>

* forest.coffee: Added workable forest-level toString which produces a pseudo-JSON tree of the nodes. The keys of the objects default to the .toString() on the node itself (which now defaults to the keyforest key). An alternative stringifier can be passed to toString; if this function always produces a properly escaped JavaScript quoted string, then the output actually becomes JSON-compatible (though parsing it may not preserve child order).
* keyforest.coffee: Added different forest-level toString which should produce JSON-compatible objects most of the time (parsing may not preserve child order).
* general-tests.js: Tests added for new toStrings.

11. By Peter S. May <pmay@pmay-desktop>

* general-tests.js: Added a couple of tests that would have triggered the recently fixed bug.

10. By Peter S. May <pmay@pmay-desktop>

* forest.coffee: Added forestUniqueKey method for the benefit of applications that might find an object identity string useful.
* keyforest.coffee: A node can now be inserted as its own sibling. The new code covers the case where the node is actually to be inserted over itself (e.g. if it is being inserted after its own previous sibling).
* general-tests.js: New case added, but there should also be another that tests node insertion over self.

9. By Peter S. May <pmay@pmay-desktop>

Changed names: insertBefore->insertBeforeSelf (nodes only), insertAfter->insertAfterSelf (nodes only), siblingBefore->prevSibling, siblingAfter->nextSibling.

8. By Peter S. May <pmay@pmay-desktop>

Corrected several problems. The library now succeeds in at least simple cases.

* test/*: Nominal test cases.

7. By Peter S. May <pmay@pmay-desktop>

* Cakefile: Added clean rule. Added util to files.
* keyforest.coffee: Rewrote loop to use forever from util.coffee. Compiler no longer complains about unreachable return.
* util.coffee: Currently contains forever, a function that reruns a callback until it returns a defined value.

6. By Peter S. May <pmay@pmay-desktop>

* Cakefile: Now has a minify task based on google compiler.
* forest.coffee: No longer returns.
* make-available.coffee: Now returns the value of the global property instead of just setting it.

5. By Peter S. May <pmay@pmay-desktop>

* Cakefile: Build file for coffeescript.
* make-available.coffee: Exposes library to global scope.
* keyforest.coffee: Removed return statement.
* src/: Now contains library scripts.

4. By Peter S. May <pmay@pmay-desktop>

* forest.coffee: The concept of keyforest extended to actual objects.
* keyforest.coffee: Several notation changes including @ for this in more places. Added eachRoot traversal. Doc additions.

3. By Peter S. May <pmay@pmay-desktop>

* keyforest.coffee: Doc changes, including API doc and license information. Added keys for methods that were accidentally hidden (isRoot, appendChild). Removed usage of coffee splice where JS splice was more appropriate. Fixed an offset check by comparing to null instead of testing boolean value.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers