Closed lambdajack closed 2 years ago
I am happy to make a fix and submit a pr for this - I am actively using Wails at the moment so would be glad to get it done as a priority.
It's already fixed on master 👍
Oh right.. Any chance you can post a link to the latest? I have pulled the master and it still has the old definitions? - am I looking in the wrong place?
This issue is driving me crazy. I swear I've fixed this twice already 🤣🤣 If you can get a PR in the next hour, I'll merge. If not I'll do it (again?) myself 👍
Haha - I've been there - PR on the way
Description
When calling
EventsOn
orEventsOnce
(defined infrontend/wailsjs/runtime/runtime.js
) on the frontend, they in turn make calls toOnMultiple
which does not exist.It should be
EventsOnMultiple
.When manually changing
runtime.js
to useEventsOnMultiple
the programme compiles and runs as expected.wails build
works as expected if changing the file just before compilation.wails dev
rebuildsruntime.js
when it detects changes. This causes any manual changes made to be effectively reversed and the functions go back to erroneously callingOnMultiple
instead ofEventsOnMultiple
Testing using
wails init -n projectname -t vanilla-ts
&... react-ts
&... svelte-ts
To Reproduce
wails init -n wailsisawesome -t react-ts
wails dev
runtime.EventsEmit(...)
) to fire every second emitting some data (I tested using a string)EventsOn(...)
in the already created App.tsx.The app will fail to compile as the frontend cannot find
OnMultiple
.runtime.js
file as described above (only this so as not to re-trigger an entire recompilation bywails dev
which would override the manual changes.The app now works as expected, receiving emitted events and corresponding data.
Expected behaviour
Calling
OnEvents
in the frontend should listen to events by correctly callingEventsOnMultiple
instead ofOnMultiple
Screenshots
No response
Attempted Fixes
When manually changing
runtime.js
to useEventsOnMultiple
the programme compiles and runs as expected.System Details