From 8c35e19ebe7588a4afb93d3d7d1b0e04bca04059 Mon Sep 17 00:00:00 2001 From: David Easter Date: Sat, 16 Aug 2014 01:45:20 -0400 Subject: [PATCH 1/3] Add missing state and node definitions and make available to the drivers. --- support/client/lib/vwf/api/kernel.js | 26 ++++++++++++++--- support/client/lib/vwf/kernel/model.js | 39 ++++++++++++++++++++++---- support/client/lib/vwf/kernel/view.js | 39 ++++++++++++++++++++++---- 3 files changed, 90 insertions(+), 14 deletions(-) diff --git a/support/client/lib/vwf/api/kernel.js b/support/client/lib/vwf/api/kernel.js index 4c788b5c9..663d33654 100644 --- a/support/client/lib/vwf/api/kernel.js +++ b/support/client/lib/vwf/api/kernel.js @@ -21,9 +21,23 @@ define( function() { var exports = { - // TODO: setState - // TODO: getState - // TODO: hashState + /// xxx + /// + /// @function + + setState: [ /* applicationState, callback() */ ], + + /// xxx + /// + /// @function + + getState: [ /* full, normalize */ ], + + /// xxx + /// + /// @function + + hashState: [], /// Create a node from a component specification. Construction may require loading data from /// multiple remote documents. This function returns before construction is complete. A callback @@ -94,7 +108,11 @@ define( function() { getNode: [ /* nodeID, full, normalize */ ], - // TODO: hashNode + /// xxx + /// + /// @function + + hashNode: [ /* nodeID */ ], /// @function /// diff --git a/support/client/lib/vwf/kernel/model.js b/support/client/lib/vwf/kernel/model.js index 26b2541e6..66bc2cc26 100644 --- a/support/client/lib/vwf/kernel/model.js +++ b/support/client/lib/vwf/kernel/model.js @@ -154,9 +154,23 @@ define( [ "module", "vwf/model" ], function( module, model ) { // -- Read-write functions ------------------------------------------------------------- - // TODO: setState - // TODO: getState - // TODO: hashState + case "setState": + + return function( applicationState, when, callback /* */ ) { + ... + }; + + case "getState": + + return function( full, normalize, when, callback ) { + ... + }; + + case "hashState": + + return function( when, callback ) { + ... + }; case "createNode": @@ -216,8 +230,23 @@ define( [ "module", "vwf/model" ], function( module, model ) { }; - // TODO: setNode - // TODO: getNode + case "setNode": + + return function( nodeID, nodeComponent, when, callback /* nodeID */ ) { + ... + }; + + case "getNode": + + return function( nodeID, full, normalize, when, callback ) { + ... + }; + + case "hashNode": + + return function( nodeID, when, callback ) { + ... + }; case "createChild": diff --git a/support/client/lib/vwf/kernel/view.js b/support/client/lib/vwf/kernel/view.js index b1f7d5a0c..e2be9ea2b 100644 --- a/support/client/lib/vwf/kernel/view.js +++ b/support/client/lib/vwf/kernel/view.js @@ -38,9 +38,23 @@ define( [ "module", "vwf/view" ], function( module, view ) { // -- Read-write functions ------------------------------------------------------------- - // TODO: setState - // TODO: getState - // TODO: hashState + case "setState": + + return function( applicationState, when, callback /* */ ) { + ... + }; + + case "getState": + + return function( full, normalize, when, callback ) { + ... + }; + + case "hashState": + + return function( when, callback ) { + ... + }; case "createNode": @@ -70,8 +84,23 @@ define( [ "module", "vwf/view" ], function( module, view ) { undefined, when || 0, callback /* result */ ); }; - // TODO: setNode - // TODO: getNode + case "setNode": + + return function( nodeID, nodeComponent, when, callback /* nodeID */ ) { + + }; + + case "getNode": + + return function( nodeID, full, normalize, when, callback ) { + ... + }; + + case "hashNode": + + return function( nodeID, when, callback ) { + ... + }; case "createChild": From e3b0ceacec6fe13d1016b23dfe0ff5c0c191a573 Mon Sep 17 00:00:00 2001 From: David Easter Date: Sat, 16 Aug 2014 01:53:59 -0400 Subject: [PATCH 2/3] Add missing sequence and tree definitions and make available to the drivers. --- support/client/lib/vwf/api/kernel.js | 6 ++++++ support/client/lib/vwf/kernel/model.js | 7 +++++++ support/client/lib/vwf/kernel/view.js | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/support/client/lib/vwf/api/kernel.js b/support/client/lib/vwf/api/kernel.js index 663d33654..95913c9ab 100644 --- a/support/client/lib/vwf/api/kernel.js +++ b/support/client/lib/vwf/api/kernel.js @@ -691,6 +691,12 @@ define( function() { descendants: [ /* nodeID, initializedOnly */ ], + /// xxx + /// + /// @function + + sequence: [ /* nodeID */ ], + /// Locate nodes matching a search pattern. matchPattern supports an XPath subset consisting of /// the following: /// diff --git a/support/client/lib/vwf/kernel/model.js b/support/client/lib/vwf/kernel/model.js index 66bc2cc26..f3821c39c 100644 --- a/support/client/lib/vwf/kernel/model.js +++ b/support/client/lib/vwf/kernel/model.js @@ -662,11 +662,18 @@ define( [ "module", "vwf/model" ], function( module, model ) { case "prototypes": case "behaviors": + case "globals": + case "global": + case "root": + case "ancestors": case "parent": case "children": + case "child": case "descendants": + case "sequence": + case "find": case "test": case "findClients": diff --git a/support/client/lib/vwf/kernel/view.js b/support/client/lib/vwf/kernel/view.js index e2be9ea2b..fc737c7e7 100644 --- a/support/client/lib/vwf/kernel/view.js +++ b/support/client/lib/vwf/kernel/view.js @@ -264,11 +264,18 @@ define( [ "module", "vwf/view" ], function( module, view ) { case "prototypes": case "behaviors": + case "globals": + case "global": + case "root": + case "ancestors": case "parent": case "children": + case "child": case "descendants": + case "sequence": + case "find": case "test": case "findClients": From 397f5488ad91a5ef0adc10c354aa623b63f145c1 Mon Sep 17 00:00:00 2001 From: David Easter Date: Sat, 16 Aug 2014 01:59:59 -0400 Subject: [PATCH 3/3] Rough in driver notification of state and node actions. --- support/client/lib/vwf/api/model.js | 24 ++++++++++++++++++++++++ support/client/lib/vwf/api/view.js | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/support/client/lib/vwf/api/model.js b/support/client/lib/vwf/api/model.js index 1a5bc84ee..f66e113a3 100644 --- a/support/client/lib/vwf/api/model.js +++ b/support/client/lib/vwf/api/model.js @@ -21,6 +21,18 @@ define( function() { var exports = { + /// xxx + /// + /// @function + + settingState: [ /* applicationState */ ], + + /// xxx + /// + /// @function + + gettingState: [], + /// Description. /// /// @function @@ -92,6 +104,18 @@ define( function() { deletingNode: [ /* nodeID */ ], + /// xxx + /// + /// @function + + settingNode: [ /* nodeID, nodeComponent */ ], + + /// xxx + /// + /// @function + + gettingNode: [ /* nodeID */ ], + /// Description. /// /// @function diff --git a/support/client/lib/vwf/api/view.js b/support/client/lib/vwf/api/view.js index 32d02dfd0..8cdb80f28 100644 --- a/support/client/lib/vwf/api/view.js +++ b/support/client/lib/vwf/api/view.js @@ -21,6 +21,18 @@ define( function() { var exports = { + /// xxx + /// + /// @function + + satState: [ /* applicationState */ ], + + /// xxx + /// + /// @function + + gotState: [], + /// Description. /// /// @function @@ -80,6 +92,18 @@ define( function() { deletedNode: [ /* nodeID */ ], + /// xxx + /// + /// @function + + satNode: [ /* nodeID, nodeComponent */ ], + + /// xxx + /// + /// @function + + gotNode: [ /* nodeID */ ], + /// Description. /// /// @function