monkey2 icon indicating copy to clipboard operation
monkey2 copied to clipboard

Notify not available on wasm

Open DruggedBunny opened this issue 6 years ago • 5 comments

Just tried to build on wasm and found Notify isn't available, not sure if intentional...

Mx2cc version 1.1.15

***** Making app 'D:/Documents/Development/Sources/Monkey2 Sources/speccy island/speccy_island.monkey2' (emscripten release llvm gcc) *****

Parsing...
Semanting...
D:/Documents/Development/Sources/Monkey2 Sources/speccy island/retrofx.monkey2 [38] : Error : Identifier 'Notify' Not found

DruggedBunny avatar Jan 19 '19 16:01 DruggedBunny

This function is under std.requesters namespace, if you jump to definition you'll see that only OpenUrl() is available for Emscripten target. So it's not a bug, but maybe there should be some replacement.

engor avatar Jan 19 '19 17:01 engor

Yeah, probably not a bug, just unimplemented; I hacked in a TARGET check to work around it.

(On the topic of wasm, I've just noticed that although all assets get bundled into a project.data file, it still creates an empty assets folder that seems not to be necessary.)

DruggedBunny avatar Jan 19 '19 22:01 DruggedBunny

'Notify' is only for Desktop target, use 'OpenURL' for emscripten. Issue can be closed.

seyhajin avatar Jun 04 '19 16:06 seyhajin

Is window.alert() not available for this purpose?

nitrologic avatar Jun 04 '19 20:06 nitrologic

Apparently this causes popup warnings from the browser, see 6fcdfbb.

seyhajin avatar Jun 04 '19 22:06 seyhajin