Alex Peters wrote:

> Perhaps your event triggers a *script call*, that in turn is able to
> access this statically defined map?

No it doesn't. It's strictly code such as
   event.create(1,1,"m[1]=2\r if(m[1])\r") ...
and similar stuff. No [EMAIL PROTECTED] type triggers.

> 
> However, I was under the impression that maps are accessible from
> anywhere once they are defined�� the variable to which the map's
> handle is saved, however, may only exist while the script runs.

Would anywhere include an event?

> The MapHandle variable would contain some sort of integer, I believe,
> that refers to the map's handle.

I don't know that the map handle is an integer. It looks more like a 
string to me. If you print it using win.debug you usually see something 
like "mXN" where X is some non-printing character, and N is an integer.

> There is nothing, however, to stop
> another script from manipulating this map if it can somehow ascertain
> this handle.

Ascertain like in "make it up"? It's an idea.

However, my "problem" is that it works while it shouldn't. So I'm afraid 
that something will break it in the future, unless I understand why it 
works.

The following shows that accessing a static map from an event doesn't 
work, at least on my system--PP correctly complains "invalid map m". But 
the more complicated script that I was referring to in my previous post 
does work, unexpectedly.

I remain puzzled :-)

--sgp

static m
local s
setstring s win.debug("m[",event.this,"] =",m[event.this])

if( not map.exists(m) )do
  m = map.create(1)
  win.debug("map",m,"created")
endif
m[ event.create(1,1,s) ] = random(100)

quit




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/JV_rlB/TM
---------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to