Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Window.status call in a VRML Script node - not working

0 views
Skip to first unread message

Bob Greer

unread,
Apr 16, 1999, 3:00:00 AM4/16/99
to
This code is at the bottom of a VRML97 program; it's running on blaxxun
Contact 4.0

Clicking on the object in the world "should" display the text "mouse
clicked" in the browser message window.

Instead this 2-line error message appears in the pop-up console when the
mouse is clicked:
"member assignment not supported status, uninitialized variable ?
member assignment not supported status, uninitialized variable ?"

What's the problem with this code snip?

Thanks,

Bob Greer
---------------------------------------------
.
.
.
DEF testMouseOver Script
{
eventIn SFBool mousey
url ["javascript: function mousey ( bool) { Window.status =
'mouseClicked'; }"]
}
]
}
ROUTE Touch.isActive TO testScript.testMouseOver
---------------------------------------------

(Incidentally, the same error is indicated when "vrmlscript" replaces
"javascript" in this code.
Likewise for replacing Window.status with self.status.)


Jane Williams

unread,
Apr 17, 1999, 3:00:00 AM4/17/99
to
On Fri, 16 Apr 1999 21:25:54 -0700, "Bob Greer"
<greer...@thegrid.net> wrote:


>Clicking on the object in the world "should" display the text "mouse
>clicked" in the browser message window.
>
>Instead this 2-line error message appears in the pop-up console when the
>mouse is clicked:
>"member assignment not supported status, uninitialized variable ?
>member assignment not supported status, uninitialized variable ?"

> DEF testMouseOver Script


> {
> eventIn SFBool mousey
> url ["javascript: function mousey ( bool) { Window.status =
>'mouseClicked'; }"]
> }
> ]
> }
>ROUTE Touch.isActive TO testScript.testMouseOver

I think your basic problem is that the script has never heard of this
strange object "Window.status". If you're used to handling window
objects from Javascript in HTML, being stuck with the VRML Browser
script interface is a real pain: there's so much you can't do!

Two solutions spring to mind.

What I've done when trying to achieve something similar is to wrap an
Anchor around the object, giving it only the children and description,
no URL. That pops up the description text in the status bar whenever
your mouse passes over the object (no click needed)

Reading the spec (!) suggests the Browser function setDescription. I
haven't tried this myself, but the spec he say:

4.12.10.8 void setDescription( SFString description )
The setDescription() method sets the passed string as the current
description. This message is displayed in a browser dependent manner.
An empty string clears the current description. Scripts that call this
method shall have mustEvaluate set to TRUE.

Bob Greer

unread,
Apr 17, 1999, 3:00:00 AM4/17/99
to
>
>I think your basic problem is that the script has never heard of this
>strange object "Window.status". If you're used to handling window
>objects from Javascript in HTML, being stuck with the VRML Browser
>script interface is a real pain: there's so much you can't do!
>
>Two solutions spring to mind.
> <excellent options snipped here>

Well, this is kind of funny, Jane, since I originally encountered this
problem in the shaved-dice VRML world at your site. <laughter>

You're page said there was something about the code that fails (unless it's
embedded in a page) so I started playing around with a version of my own.
(I want to see how completely I can integrate VRML and javascript without
resorting to that EAI stuff.)

(Incidentally, the way, the "return bool;" line in your sample is not active
in your sample: the function itself is not on the right of an assignment
statement in your code. The examples at Netscape are like yours in this
respect, but they are general purpose examples.)

I actually began with the belief that Window.status was unavailable in a
VRML script since the Window object is not included in the list defined in
the VRML Specification. I figured that there's always room for a pleasant
surprise, and looking around I saw that some of your objects were pretty
slick, so... I assumed you were one up on me here. (LOL, life is really fat
sometimes!)

Going back to the Spec. looks like the way to go; thanks for the excellent
suggestion re. setDescription() which definitely sounds like the canonical
solution to this problem. I'll try that soon and perhaps drop you a note if
something interesting comes up by that route.

BTY, that walled city is pretty kick-ass, Jane. You're onto something
there; and the building layout seems very natural. It was really a chore
to maneuver my browser through that narrow gate in the outer wall; but I
guess the gate's designed that way for a good reason.

Later,

Bob

Paul S. Hoffman

unread,
Apr 17, 1999, 3:00:00 AM4/17/99
to Bob Greer
Bob Greer wrote:

> This code is at the bottom of a VRML97 program; it's running on blaxxun
> Contact 4.0
>

> Clicking on the object in the world "should" display the text "mouse
> clicked" in the browser message window.

> ...


> DEF testMouseOver Script
> {
> eventIn SFBool mousey
> url ["javascript: function mousey ( bool) { Window.status =
> 'mouseClicked'; }"]
> }
> ]
> }
> ROUTE Touch.isActive TO testScript.testMouseOver

Maybe I'm missing something here, Bob, but shouldn't that ROUTE
statement be different?
"ROUTE Touch.isActive TO testMouseOver.mousey" would direct the mouse
click to the Script. In this code snippet, there's no "testScript" node
with a "testMouseOver" event in.

- Paul
***********************************
Paul S. Hoffman
Senior Interface Designer, Cognetics Corporation
pau...@pluto.njcc.com, pa...@cognetics.com
Company URL - http://www.cognetics.com
Personal URL - http://pluto.njcc.com/~paulsam
609-799-5005 ext.237 - FAX 609-799-8555

Jane Williams

unread,
Apr 18, 1999, 3:00:00 AM4/18/99
to
On Sat, 17 Apr 1999 00:45:43 -0700, "Bob Greer"
<greer...@thegrid.net> wrote:

>>
>>I think your basic problem is that the script has never heard of this
>>strange object "Window.status". If you're used to handling window
>>objects from Javascript in HTML, being stuck with the VRML Browser
>>script interface is a real pain: there's so much you can't do!
>>
>>Two solutions spring to mind.
>> <excellent options snipped here>
>
>Well, this is kind of funny, Jane, since I originally encountered this
>problem in the shaved-dice VRML world at your site. <laughter>
>
>You're page said there was something about the code that fails (unless it's
>embedded in a page) so I started playing around with a version of my own.
>(I want to see how completely I can integrate VRML and javascript without
>resorting to that EAI stuff.)

>I actually began with the belief that Window.status was unavailable in a


>VRML script since the Window object is not included in the list defined in
>the VRML Specification. I figured that there's always room for a pleasant
>surprise, and looking around I saw that some of your objects were pretty
>slick, so... I assumed you were one up on me here. (LOL, life is really fat
>sometimes!)

(sigh) I only left that up in the hope that someone would find a
better method and tell me all about it. Looks like I'm out of luck.

Bob Crispen

unread,
Apr 18, 1999, 3:00:00 AM4/18/99
to
Jane Williams wrote:

> (sigh) I only left that up in the hope that someone would find a
> better method and tell me all about it. Looks like I'm out of luck.

Browser.setDescription() is the canonical way. However, I've
discovered this afternoon that the Blaxxun browser doesn't
seem to support it.

There's an example of the function at:
http://home.hiwaay.net/~crispen/worlds/tutorial/lightbulb7.html#HERE
http://home.hiwaay.net/~crispen/worlds/tutorial/lightbulb8.html#HERE
(text) and
http://home.hiwaay.net/~crispen/worlds/tutorial/lightbulb7.wrl
http://home.hiwaay.net/~crispen/worlds/tutorial/lightbulb8.wrl
(VRML)
--
Bob Crispen
cri...@hiwaay.net
What a day, what a day, for an auto-da-fe.

Leonard Daly

unread,
Apr 18, 1999, 3:00:00 AM4/18/99
to
Jane & Bob,

I have used the VRML/JavaScript function Browser.setDescription to set the
browser status bar. I have an example on my VRML Examples pages at:
http://www.realism.com/vrml/example.html#BrowserStatus


Leonard Daly <da...@realism.com>
Information Visualization Specialist & VRML Educator
Daly Realism - Interactive Web Solutions
(http://www.realism.com)

Treasurer, LA VR User's Group: http://lavug.org/
Co-Chair, Web3D Content Development WG

Jane Williams wrote:

Bob Greer

unread,
Apr 18, 1999, 3:00:00 AM4/18/99
to
Hi Leonard,

Thanks for the link to a good example of setDescription(). I tried your
(very solid) code and no text was displayed in the status bar for any of the
object in your sample world.

A blaxxun rep was kind enough to answer my question about the odd display I
got in the status bar with the sample of setDescription that I posted. (The
message text was only loaded into the bar when the touch Sensor was
inactive; and forcing the text to appear with an if -else statement also
didn't managed to load the text.)

Apparently there is a competition for that space bar; I was told that the
TouchSensor tries to load "Touch" (a string) into the box whenever a
mouse-over situation exists, and that this prevented my setDescription()
text from appearing in that case.

This explanation seems a bit inaccurate since "Touch" doesn't appear if the
setDescription() code is removed from the node. So there might be a
compatibility issue with my system too; I won't judge the matter further.

But blaxxun Contact 4.1 won't allow the setDescription to be used as it is
used in my sample. That's a limit of this version of Contact, and not a
syntax problem.

Thanks again!

And incidentally, you've set up a very attractively formatted VRML samples
page, Leonard! Clean cut and easy to use!

Sincerely,

Bob Greer


Leonard Daly wrote in message <371ABC45...@realism.com>...

0 new messages