From 341974fcc95769fb06edcfa2a092e18b25a87aba Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 29 Jan 2020 17:17:37 +0300 Subject: [PATCH 1/3] testing... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/ui-widgets.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui (gen4)/features/ui-widgets.js b/ui (gen4)/features/ui-widgets.js index df169bb9..8058d99f 100755 --- a/ui (gen4)/features/ui-widgets.js +++ b/ui (gen4)/features/ui-widgets.js @@ -1251,6 +1251,7 @@ function(spec, callback){ // other... : that(field) }) // batch callback... + var __v = Date.now() var cb callback && this.dialog @@ -1258,6 +1259,7 @@ function(spec, callback){ // multiple times... // ...change to .close(..) when fixed... .one('close', cb = function(mode){ + console.log('callback:', __v) // XXX get the field data and pass it to the callback... callback( // get the field-value pairs... @@ -1278,15 +1280,17 @@ function(spec, callback){ mode) }) // reset the callback on update... // XXX this does not work yet... - // there seem to be two problems here: + // there seems to be two problems here: // - 'update' is triggered on first draw, thus // triggering .off(..)... // ...this should lead to the callback(..) not // being called at all -- see next issue... // - .off(..) for some reason does not work... .one('update', function(){ + console.log('update:', __v) // XXX BUG? this.off(..) will not work with non-standard events... this.dom.off('close', cb) }) }) + && console.log('batch:', __v) return this } From 813dd1fd4b818720deccf004e2caded3b10b1dc2 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 29 Jan 2020 17:18:21 +0300 Subject: [PATCH 2/3] typo fix... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/ui-widgets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui (gen4)/features/ui-widgets.js b/ui (gen4)/features/ui-widgets.js index 8058d99f..4e0a4e92 100755 --- a/ui (gen4)/features/ui-widgets.js +++ b/ui (gen4)/features/ui-widgets.js @@ -1289,7 +1289,7 @@ function(spec, callback){ .one('update', function(){ console.log('update:', __v) // XXX BUG? this.off(..) will not work with non-standard events... - this.dom.off('close', cb) }) }) + this.dom.off('close', cb) }) && console.log('batch:', __v) return this } From cb7e8b796d5ad8f81cb74dac077521d29a8866e1 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 30 Jan 2020 01:22:19 +0300 Subject: [PATCH 3/3] testing... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/ui-widgets.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui (gen4)/features/ui-widgets.js b/ui (gen4)/features/ui-widgets.js index 4e0a4e92..76aa0ffa 100755 --- a/ui (gen4)/features/ui-widgets.js +++ b/ui (gen4)/features/ui-widgets.js @@ -1282,10 +1282,11 @@ function(spec, callback){ // XXX this does not work yet... // there seems to be two problems here: // - 'update' is triggered on first draw, thus - // triggering .off(..)... + // triggering .off(..)... (CONFIRMED) // ...this should lead to the callback(..) not // being called at all -- see next issue... - // - .off(..) for some reason does not work... + // - .off(..) for some reason does not work... (CONFIRMED) + // ...are we off-ing the right source??? .one('update', function(){ console.log('update:', __v) // XXX BUG? this.off(..) will not work with non-standard events...