manatlan / guy

Graphics User Ynterface : a simple module for making GUI applications (with html/js) for py3 ... to target windows, linux, mac & android
Apache License 2.0
202 stars 23 forks source link

Error in doc #9

Closed bendub closed 4 years ago

bendub commented 4 years ago

Hello Manatlan, It seems there is an error in the documentation in part "async self.cfg" of "Server side" page. It is mentioned:

To get a var 'name', in py side : name = await self.cfg.name

But when I used this syntax, it raises an error:

TypeError: object str can't be used in 'await' expression

I prepare a test case with and without the use of 'await': https://glitch.com/edit/#!/test-pycfg Thank you.

manatlan commented 4 years ago

You've right ! I've missed something ;-) (btw I haven't (and I should) write pytests for this CORE feature) I've made a test : https://glitch.com/edit/#!/guy-cfg?path=test_pycfg.py:25:0 (with add/show for client/server side) ... and it works as expected (but you're right, no need to await on server side)

manatlan commented 4 years ago

docs updated ! thx

manatlan commented 4 years ago

btw, I've just commited some pytest covering set/get cfg feature on client/server sides...