HTML5: Import brl causes runtime error

Monkey Forums/Monkey Bug Reports/HTML5: Import brl causes runtime error

MikeHart(Posted 2014) [#1]
Hi Mark,

from at least V76a on, importing BRL causes a runtime error.

Platform Windows 7 Pro, IE9.

Samnple script: Your very own fileiotest.monkey


marksibly(Posted 2014) [#2]
fileiotest works OK here, but I've got IE11 installed.

Don't think I can also install IE9, but I suspect it's databuffer related - IE has only recently gained usable databuffer support, not sure if we ever found a usable replacement. LoadString is probably the best you can do on IE9.

What error are you getting precisely?


MikeHart(Posted 2014) [#3]
Will post tommorow when i am back at work.


MikeHart(Posted 2014) [#4]
Ok, I compiled this in debug mode and the messages in the Browser Console are these:

SCRIPT5009: "ArrayBuffer" ist undefiniert 
main.js, Zeile 1708 Zeichen 1
SCRIPT5007: Für die Eigenschaft "call" kann kein Wert abgerufen werden: Das Objekt ist Null oder undefiniert 
main.js, Zeile 3535 Zeichen 2


The first one means "Arraybuffer is undefined" and the second one means that no value for the property "call" could have been found. The object is NULL or undefined.


nikoniko(Posted 2014) [#5]
marksibly wrote:
Don't think I can also install IE9,


You may try to change compatible mode to IE9.


marksibly(Posted 2014) [#6]
Ok, IE9 doesn't support DataBuffers.

I can remove the 'import databuffer' from brl.monkey if you want (and everyone's OK with that) but it wont make fileiotest (or any code that uses databuffers) run on IE9. Alternately, if you want to write 'IE9 compatible' code, don't use 'import brl' (use explicit import brl.filestream etc instead) and don't import brl.databuffer.

Personally, I'd be happier NOT twisting things for the sake of backward compatibility (ie: leave everything as is) as html5 is always gonna depend to some degree on clients having modern-ish browsers.

All just part of the fun of html5, esp. on MS browsers...!

> You may try to change compatible mode to IE9.

How?


MikeHart(Posted 2014) [#7]
Ok, I think it is a valid reason not to change things. Thanks for looking into this.