Slow down fetching
This commit is contained in:
@@ -75,7 +75,7 @@ feature
|
|||||||
container.add_control (form)
|
container.add_control (form)
|
||||||
|
|
||||||
--Progress bar
|
--Progress bar
|
||||||
container.add_control (create {WSF_BASIC_CONTROL}.make_with_body("h4","","Number1/Number2"))
|
container.add_control (create {WSF_BASIC_CONTROL}.make_with_body("h4","","Autoincrementing progressbar"))
|
||||||
create source.make
|
create source.make
|
||||||
create progress.make_progress_with_source ("progress1", source)
|
create progress.make_progress_with_source ("progress1", source)
|
||||||
source.set_control (progress)
|
source.set_control (progress)
|
||||||
@@ -88,7 +88,7 @@ feature
|
|||||||
do
|
do
|
||||||
form.validate
|
form.validate
|
||||||
if form.is_valid then
|
if form.is_valid then
|
||||||
progress.set_progress ((textbox1.text.to_integer_64 / textbox2.text.to_integer_64 * 100).ceiling)
|
--progress.set_progress ((textbox1.text.to_integer_64 / textbox2.text.to_integer_64 * 100).ceiling)
|
||||||
text := textbox1.text + " + " + textbox2.text + " = " + (textbox1.text.to_integer_64 + textbox2.text.to_integer_64).out
|
text := textbox1.text + " + " + textbox2.text + " = " + (textbox1.text.to_integer_64 + textbox2.text.to_integer_64).out
|
||||||
text.append ("<ul>")
|
text.append ("<ul>")
|
||||||
across
|
across
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ class WSF_PROGRESS_CONTROL extends WSF_CONTROL
|
|||||||
self = @
|
self = @
|
||||||
runfetch= ()->
|
runfetch= ()->
|
||||||
self.fetch()
|
self.fetch()
|
||||||
setInterval(runfetch, 100)
|
setInterval(runfetch, 5000)
|
||||||
|
|
||||||
fetch: ()->
|
fetch: ()->
|
||||||
trigger_callback(@control_name, 'progress_fetch')
|
trigger_callback(@control_name, 'progress_fetch')
|
||||||
|
|||||||
@@ -483,7 +483,7 @@
|
|||||||
runfetch = function() {
|
runfetch = function() {
|
||||||
return self.fetch();
|
return self.fetch();
|
||||||
};
|
};
|
||||||
return setInterval(runfetch, 100);
|
return setInterval(runfetch, 5000);
|
||||||
};
|
};
|
||||||
|
|
||||||
WSF_PROGRESS_CONTROL.prototype.fetch = function() {
|
WSF_PROGRESS_CONTROL.prototype.fetch = function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user