From e712c2f9b8c2dbc340f28fc042f7b4fa4dbdbc14 Mon Sep 17 00:00:00 2001 From: Richard Jarvis Date: Fri, 8 Mar 2019 21:29:36 +0000 Subject: [PATCH] Fixed typo in advanced loops docs #564 --- docs/mkdocs/docs/pythonLoopsAndSleeps.md | 2 +- docs/mkdocs/docs/whatsNew.md | 1 + examples/issues/issue564.py | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 examples/issues/issue564.py diff --git a/docs/mkdocs/docs/pythonLoopsAndSleeps.md b/docs/mkdocs/docs/pythonLoopsAndSleeps.md index 77071a6..9c60b6b 100644 --- a/docs/mkdocs/docs/pythonLoopsAndSleeps.md +++ b/docs/mkdocs/docs/pythonLoopsAndSleeps.md @@ -98,7 +98,7 @@ def acceleratingCountdown(): if counter > 0: app.setLabel("counter", str(counter)) counter -= 1 - app.after(100*counter, myLoop) + app.after(100*counter, acceleratingCountdown) app.after(0, acceleratingCountdown) ``` diff --git a/docs/mkdocs/docs/whatsNew.md b/docs/mkdocs/docs/whatsNew.md index 7c8a523..b29cd4a 100644 --- a/docs/mkdocs/docs/whatsNew.md +++ b/docs/mkdocs/docs/whatsNew.md @@ -30,6 +30,7 @@ *
Improved
[Scales](/inputWidgets/#scale) and other widgets can now have their state changed when in [ttk](/pythonTtk/) mode - [#465](https://github.com/jarvisteach/appJar/issues/465) *
Improved
Better change log? - [#219](https://github.com/jarvisteach/appJar/issues/219) *
Improved
appJar now uses tkinter style `config` functions - [#49](https://github.com/jarvisteach/appJar/issues/49) +*
Fixed
Fixed typo in documentation page: [advancedLoops](/pythonLoopsAndSleeps/#advanced-loops) - [#564](https://github.com/jarvisteach/appJar/issues/564) *
Fixed
python2.6 now runs, after removing dependency on argsparse - [#547](https://github.com/jarvisteach/appJar/issues/547) *
Fixed
Resolved issues sometimes changing bg/fg in [ttk](/pythonTtk) - [#536](https://github.com/jarvisteach/appJar/issues/536) *
Fixed
Resolved issues with changing [radiobutton](/inputWidgets/#set-radiobuttons) type in ttk - [#534](https://github.com/jarvisteach/appJar/issues/534) diff --git a/examples/issues/issue564.py b/examples/issues/issue564.py new file mode 100644 index 0000000..c2f6e45 --- /dev/null +++ b/examples/issues/issue564.py @@ -0,0 +1,19 @@ +import sys +sys.path.append("../../") + +from appJar import gui + +with gui() as app: + app.label('counter') + + # global variable to store the count + counter = 10 + + def acceleratingCountdown(): + global counter + if counter > 0: + app.setLabel("counter", str(counter)) + counter -= 1 + app.after(100*counter, acceleratingCountdown) + + app.after(0, acceleratingCountdown)