[Ometa] ometa on IE - is a string necesarrily an array of
characters?
Rüdiger Plantiko
ruediger.plantiko at astrotexte.ch
Fri Jul 3 12:18:19 PDT 2009
Hello Alex,
I searched a bit for the cause why your {OMeta-JS} 2.0 doesn't work on IE (neither v.7 nor 8), whereas it *does* work in Firefox and Google Chrome.
I found out that one of the reasons is that you delegate
String.prototype.toOMInputStream = Array.prototype.toOMInputStream
therefor implicitly assuming that a string is an array of characters, i.e. you assume
"x"[0] == "x"
which holds for the Chrome and FF implementations, but not for IE. It seems that this is an assumption which is left free as an implementation detail to the interpreter developers.
I changed the above statement to
String.prototype.toOMInputStream = ("x"[0] == 'x') ? Array.prototype.toOMInputStream : function() { return makeArrayOMInputStream(this.split(''), 0) }
which made the things a bit better. But still it hangs somewhere. In IE 8, one could use the built-in debugger to find out the cause that it still fails. But I must admit that I got lost in all these "$elf" and "_apply()"s, being somewhere in the 27th level of "anonymous function"s in the callstack...
Can you give a hint which place of the code would be a good candidate for a break-point? I want to trace the failure of such a simple statement as
ometa M {}
i.e. I am still in the translation phase of the OMeta clause which precedes the execution.
Thanks for any help in this matter!
Regards,
Rüdiger
More information about the OMeta
mailing list