Page 1 of 1
KeyPress signature
Posted: 20 Apr 2014, 19:17
by gajop
Can anyone confirm what the correct signature for widget:KeyPress is?
According to the
wiki it's
Code: Select all
addon.KeyPress(key, mods, isRepeat)
but it seems chili, and a bunch of other widgets including an old zk widget handler expect
Code: Select all
function widget:KeyPress(key, mods, isRepeat, label, unicode)
Now the second (chili-like) version works for me on Linux (96), but doesn't seem to be working on Windows (96.0 and 96.0.1-412-g7c7d24c). (All this can cause issues with text input if unicode is missing)
Re: KeyPress signature
Posted: 20 Apr 2014, 20:21
by jK
gajop wrote:Now the second (chili-like) version works for me on Linux (96), but doesn't seem to be working on Windows (96.0 and 96.0.1-412-g7c7d24c). (All this can cause issues with text input if unicode is missing)
TextInput has changed with 96+ (unicode arg is always 0) cause of SDL2 switch (not all text input is a keypress now).
check changelog
Re: KeyPress signature
Posted: 20 Apr 2014, 21:39
by gajop
Well, this callin never gets invoked:
Code: Select all
function widget:TextInput(utf8, ...)
Maybe because my widgethandler is old? How do I update?
The
widgets.lua from the spring repo doesn't seem to have a TextInput call-in either.
Re: KeyPress signature
Posted: 21 Apr 2014, 19:57
by jK
hmmm I always use new addonhandler in my dev environment, didn't thought of old widgethandler when I made the needed changes.
Re: KeyPress signature
Posted: 22 Apr 2014, 12:45
by gajop
What's the addonhandler, and how can I use it?
search comes up empty:
https://github.com/spring/spring/search ... &type=Code
Re: KeyPress signature
Posted: 19 Aug 2014, 23:45
by abma