<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
I may be missing something obvious, but please enlighten me:<br>
<br>
Is there a way to get a handle on 'this' proto's instance from
within a script in that proto?<br>
<br>
Ex:<br>
<br>
PROTO myproto [<br>
inputOutput SFString s ""<br>
]<br>
{<br>
DEF pscript Script {<br>
url [ "ecmascript:<br>
function initialize()<br>
{<br>
Browser.addRoute ( somenode, 'somefield', <font
color="#cc0000">I NEED TO ACCESS THIS PROTO INSTANCE NODE HERE</font>,
's');<br>
}<br>
<br>
I'm using Contact FWIW. I can see that Contact has a lovely external
'get node by DEF name' feature, not available in internal script. I
don't see any API which takes DEF name strings and creates routes.<br>
I'd really like to avoid having to crawl the scene graph looking for
my instance by name (that name being a proto field set same as the
DEF name for it).<br>
<br>
Thanks<br>
<br>
Dave A.<br>
</body>
</html>