On Jul 19, 5:43 pm, Sean Gilligan <[email protected]> wrote:
>   On 7/18/10 8:37 PM, Sean Gilligan wrote:
>
> >  On 7/18/10 4:45 AM, RobG wrote:
> >> There is a method of declaring a global variable that is absolutely
> >> guaranteed to work in any user agent that implements any version of
> >> ECMAScript, it even uses fewer characters:
>
> >>    var iui = {...
>
> > I just fixed that one in my active clone that I'm  doing the iPad work
> > in:
> >http://code.google.com/r/msgilligan-iuiscroll/source/detail?r=115d6b9...
>
> > Look good?
>
> Actually, that change isn't good.  It's not that simple of a fix.  I
> backed it out for now...

You can either:

1. Declare var iui outside the anonymous function (e.g. as the very
first line of the script) which is the simplest way, or

2. From within the function:

  var global = (function(){return this;})();

  global.iui = ...


--
Rob

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to