Skip to content

Releases: manatlan/htag

v0.100.0 "ev"

18 Mar 16:44
Compare
Choose a tag to compare

Here come the "ev" system for (real) events mechanism.

I didn't planned to introduce such a big change like this, but it will be a lot better !

Til now ... the "object" (caller_object) which is passed to the callback method is the current object which has emitted the event.

    def add_content( caller_object ): #  caller_object is the Tag.button
         self += "hello"

    self += Tag.button("add", _onclick=add_content)

Now, there is a quirk, to pass a "real event" (like a javascript dom event) : if you name it "ev", htag will pass an "event" ! So you will need to adapt your code to :

    def add_content( ev ): # ev is a event (namedTuple)
         self += "hello"

    self += Tag.button("add", _onclick=add_content)

And now, ev is not a "caller object" anymore, but an "event" ... and so, the "caller object" is in ev.target (like in js side), others properties are properties of ev (ex: ev.clientX)

It's a quirk (because it's only based on the name of the argument), but I have a lot of components to adapt ... and don't want to introduce big api changes too. But need to find a better way for the future 1.0 ;-)

IMPORTANT : this version works only on simple callback (with a unique parameter "ev"). If you try to bind "ev" and other parameters : it can't work ! Need to fix soon

v0.91.1

14 Mar 12:40
Compare
Choose a tag to compare

minor changes

(no more internal/example/ut of use of .set(x))

v0.91.0

14 Mar 07:20
Compare
Choose a tag to compare

tag.set(x) is now deprecated .... you should use tag.clear(x) which is the same as :

tag.clear()
tag += x

(want to preserve get/set methods on tag, for futures versions > 1.0)

v0.90.4

01 Mar 13:52
Compare
Choose a tag to compare

minor changes

The "starter app" (created with python3 -m htag) got an app with a simple interaction ...
And the pypi package readme should be better

v0.90.3

01 Mar 08:06
Compare
Choose a tag to compare

minor fixes

v0.90.2

29 Feb 12:51
Compare
Choose a tag to compare

python3 -m htag : create a main.py with the new Runner ! (no more browserhttp or devapp !)

v0.90.1

28 Feb 16:59
Compare
Choose a tag to compare

just a litlle fix (__main__ use runner with param 'debug' instead of 'dev')

but this v0.90 is a real breathe, and it seems to work as expected ;-)
Now, need to update docs, and rewrite completly htagapk to expose the new way to create an android apk

v0.90.0 - all runners are deprecated

28 Feb 12:25
Compare
Choose a tag to compare

All current runners (desktop) replaced by faked ones (using the new runner)

All others good old runners are now faked ones (but compatibles) : BrowserHTTP, BrowserStarletteHTTP, BrowserStarletteWS, DevApp, ChromeApp, WinApp, AndroidApp, BrowserTornadoHTTP ... and they are just using the new runner (in pure python, no more dependancies likes uvicorn, starlette, tornado, kivy etc ...). All these would completly disappear when 1.0.0 will be released.

It's a transition phase, before 1.0.0 ....

There will be only 3 runners : "pyscript", "pywebview" and the new one (which will work for android, desktop and/or chrome app mode)) (pywebview could be in another package (to avoid dependancy to webview package)

TODO: docs+finition on the new runner ... (that's why I didn't mention the new name)

v0.83.2

27 Feb 18:27
Compare
Choose a tag to compare

nothing to say

(runner.run() with no parameters, everything in constructor !)

v0.83.1

25 Feb 10:08
Compare
Choose a tag to compare

nothing to say ;-)