use defined PROTO in "Browser.createVrmlFromString"? 
Author Message
 use defined PROTO in "Browser.createVrmlFromString"?

Hi all,

First... let me thanks for all of you that have
helped me b4. I really think that ppl here are
very helpful. :)

Now, I have another question.
I find that by using the function
    "Browser.createVrmlFromString",
it is not possible to include "USE ..." into
the function. Again, do any of you know that if
predefined PROTO can be used in this function to
add a new children to a Node?

Thx in advance.

cheers,
mcbear

Below is the simplified code of the implementment in query:
-----------------------------------------------------------
PROTO MSG [ ...]
{ ...  }

Transform {
children [
 DEF ROOT Group {}
 DEF LOADED ProximitySensor { size 10000 10000 10000 }
 DEF MSG_SCP Script {
  eventOut  MFNode  newNodes
  eventIn  SFBool  read
  url [ "javascript
    function read() {
     freshNodes = Browser.createVrmlFromString('MSG { } ');
     newNodes[0] = freshNodes[0];
   }
 " ]
 }
]
ROUTE LOADED.isActive TO MSG_SCP.read
ROUTE MSG_SCP.newNodes TO ROOT.addChildren

Quote:
}

-----------------------------------------------------------


Tue, 13 Nov 2001 03:00:00 GMT  
 use defined PROTO in "Browser.createVrmlFromString"?


Quote:
> Hi all,

> First... let me thanks for all of you that have
> helped me b4. I really think that ppl here are
> very helpful. :)

> Now, I have another question.
> I find that by using the function
>     "Browser.createVrmlFromString",
> it is not possible to include "USE ..." into
> the function.

That isn't true. But you can only USE nodes that have been DEF'd within the
vrmlstring.

Quote:
> Again, do any of you know that if
> predefined PROTO can be used in this function to
> add a new children to a Node?

Similarly, the PROTO (or EXTERNPROTO) must be defined within the vrmlstring.

--
Braden N. McDaniel

<URI:http://www.endoframe.com>



Wed, 14 Nov 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. proto-PEP: interpolated strings using ""if

2. Instantiate PROTO using createVrmlFromString

3. "url IS mystring" in PROTO

4. Public Domain PROTO: "Rotator"

5. proto-PEP: "unless" expression

6. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

7. Using DEF in Browser.createVrmlFromString() method

8. define "variable" word

9. Redesigning "define interface"

10. defining "|" as or in Poplog Prolog

11. Lets define "pointer"

12. Lets define "pointer"

 

 
Powered by phpBB® Forum Software