[parenscript-devel] What about (declare (special foo))?
Daniel Gackle
danielgackle at gmail.com
Thu Jan 7 04:26:29 UTC 2010
Cool. Do you plan to use "window" or the other trick?
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.
Daniel
On Wed, Jan 6, 2010 at 8:03 PM, Vladimir Sedach <vsedach at gmail.com> wrote:
> After scratching my head about how to get a reference to the global
> object for a while, StackOverflow came to the rescue:
>
>
> http://stackoverflow.com/questions/383185/javascript-check-if-in-global-context
>
> Implementation to be done later.
>
> Vladimir
>
> 2010/1/4 Vladimir Sedach <vsedach at gmail.com>:
> >> Do you (or does anyone) think that the above would be a bad idea? If so,
> >> why?
> >>
> >> We have a macro right now that does the above in a somewhat ugly way,
> and
> >> it's very handy on the 3 or 4 occasions that we need it.
> >
> > How does your macro introduce the global variable? Does it get a
> > reference to the toplevel object? I think that's probably the way to
> > go.
> >
> > Vladimir
> >
> >> Daniel
> >>
> >> _______________________________________________
> >> parenscript-devel mailing list
> >> parenscript-devel at common-lisp.net
> >> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
> >>
> >>
> >
>
> _______________________________________________
> parenscript-devel mailing list
> parenscript-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/parenscript-devel/attachments/20100106/3ea32d15/attachment.html>
More information about the parenscript-devel
mailing list