Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2020-03-31 13:58:39



Reply to topic  [ 3 posts ] 
Spawning textbox from llDialog() 
Author Message

Joined: 2014-03-22 03:17:49
Posts: 33
Reply with quote
Hi Henri,

I have come across an undocumented LL viewer behavior with llDialog that has escaped into the wild. Specifically, its showing up in the Nanaite Systems robot toys.

What it is:
The LSL wiki has this line about llDialog: "If the script generates button labels from outside sources like inventory or object names, take care to avoid the special string "!!llTextBox!!". This text, in button 0, will cause llDialog to behave as llTextBox instead."

Cool VL handles that as expected, and if "!!llTextBox!!" shows up in other positions than 0, you wind up with a standard menu with a button that says "!!llTextBox!!". This is in keeping with what i would expect.

However, reality is different than the 'spec'. In the LL mainline viewer and viewers based on it... putting "!!llTextBox!!" into any button position results in spawning a text box.

Impact:
As you probably already guessed, This prevents toys that rely on this behavior from working in Cool VL.

Personal thoughts:
I think this is an LL Bug that escaped in Viewer 2, or "undocumented feature" at best... and not a problem with Cool. I guess i am not totally surprised someone stumbled over the bug, but to actually use it instead of an explicit llTextbox call, or the canonical 'llDialog' version boggles my mind. In any case, we have to live with the fact its out there.

Also, its interesting that the decision to display either a textbox or dialog box is on the viewer side.

In any case, if you could add this 'feature' to Cool it would be nice, but i respect your thoughts on it. I am going to go pour some bourbon into my coffee now.

As always,
Thank You!
~Lycia


2019-06-15 21:55:48
Profile

Joined: 2009-03-17 18:42:51
Posts: 4180
Reply with quote
I moved your post to the feature requests forum, because it is indeed not relating to a viewer bug...

The LSL text box dialog was one of those features that have been imagined and implemented by TPV developers (not sure which TPV implemented it first, but it was not mine) and only adopted by LL much later (in a late v2 viewer version). At first, only llDialog() existed, and so that "magic button label" was adopted to trigger text box creation, viewer side. Since buttons are not configurable in text boxes, only the first button was tested for that value. Doing some archeological study in the viewer code, I could see that other buttons values were in fact concatenated together and passed as "default text" (for the text box contents, I assume) to the dialog-making code, but since there is nothing in that code allowing to substitute parameters in a dialog input field (parameters can only be substituted in the dialog message text), that "default text" was actually never used...

When LL implemented llTextBox() server side, they added the support for it in their viewer in a way where all button labels are tested for the "magic label value", instead of just the first, and the dialog is then turned into a text box one if any button label is equal to that value.

I suppose you came across one of the scripts that have been modified over time, and where the scripter was too lazy to use llTextBox() once it was implemented, or who thought that some viewers would end up implementing the "default text" feature (and since llTextBox() does not have such a parameter, they use llDialog() instead, not caring about the magic label position, since LL's v2 viewer and its forks accepted any of them).

In any case, I modified the Cool VL Viewer code to behave like LL's. This will be implemented in the next releases.


2019-06-16 08:52:50
Profile WWW

Joined: 2014-03-22 03:17:49
Posts: 33
Reply with quote
that was a cool lesson in viewer development, and its pretty amazing that you were able to dig all that up! It provides a lot of perspective on the environment and what is likely to be floating around out there.

Also...Thank you tons for that feature update!


2019-06-17 00:28:35
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.