Cool. Do you plan to use "window" or the other trick?<br><br>To answer your earlier question - we're not accessing the global object at all; we're declaring any such variables manually using var at the toplevel (in other words, what we're doing is braindead). Stuffing them in the global object then taking them out again on scope exit seems like the right way.<br>
<br>Daniel<br><br><br><div class="gmail_quote">On Wed, Jan 6, 2010 at 8:03 PM, Vladimir Sedach <span dir="ltr"><<a href="mailto:vsedach@gmail.com">vsedach@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
After scratching my head about how to get a reference to the global<br>
object for a while, StackOverflow came to the rescue:<br>
<br>
<a href="http://stackoverflow.com/questions/383185/javascript-check-if-in-global-context" target="_blank">http://stackoverflow.com/questions/383185/javascript-check-if-in-global-context</a><br>
<br>
Implementation to be done later.<br>
<br>
Vladimir<br>
<br>
2010/1/4 Vladimir Sedach <<a href="mailto:vsedach@gmail.com">vsedach@gmail.com</a>>:<br>
<div><div></div><div class="h5">>> Do you (or does anyone) think that the above would be a bad idea? If so,<br>
>> why?<br>
>><br>
>> We have a macro right now that does the above in a somewhat ugly way, and<br>
>> it's very handy on the 3 or 4 occasions that we need it.<br>
><br>
> How does your macro introduce the global variable? Does it get a<br>
> reference to the toplevel object? I think that's probably the way to<br>
> go.<br>
><br>
> Vladimir<br>
><br>
>> Daniel<br>
>><br>
>> _______________________________________________<br>
>> parenscript-devel mailing list<br>
>> <a href="mailto:parenscript-devel@common-lisp.net">parenscript-devel@common-lisp.net</a><br>
>> <a href="http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel" target="_blank">http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel</a><br>
>><br>
>><br>
><br>
<br>
_______________________________________________<br>
parenscript-devel mailing list<br>
<a href="mailto:parenscript-devel@common-lisp.net">parenscript-devel@common-lisp.net</a><br>
<a href="http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel" target="_blank">http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel</a><br>
</div></div></blockquote></div><br>