how to tell if a global is allready defined


    Feb 08 2006 | 3:05 am
    if i have a js file which creates a global and some global js variables, how can i prevent another instance of that js overwriting/interfering with that global. Is there an "isdefined()" or similar method.
    thanks,
    oli
    www.oli.adbe.org

    • Feb 08 2006 | 10:28 am
      Oliver, heres a little fragment. I had a hard time dealing with
      this issue. and I'm still not quite sure what works and what
      doesn't. it's an anomaly just seems to obvious to me. I mean who
      want to define a global that you cant read elsewhere.... anyway this
      seems to do the trick. its from my solomute.js
      var gtabs = new Global("sologlobal");
      if(gtabs[mygroup]==undefined)
      {gtabs[mygroup]=new Object();}
      someone more knowledgeable will probably say something more interesting
      I'm about to pass out on benidryl. feh
      plop
      -matt
      . . . . . . . . . . . .
      Http://www.EstateSound.com
      Http://ideasforstuff.blogspot.com
      . . . . . . . . . . . .
    • Feb 09 2006 | 11:09 am
      hi matthew,
      this method seems to be working. thanks very much,
      oli
      www.oli.adbe.org