Jump to content
  • 0
Rolig Loon

Closing Extra Dialog Boxes

You are about to reply to a thread that has been inactive for 169 days.

Please take a moment to consider if this thread is worth bumping.

Question

I am having a non-brain moment.  Quite a while ago, I remember modifying something -- a debug setting maybe -- that makes multiple dialog boxes stay open, stacking up on my screen, unless I actively close them.  I can't remember what it was, and now I want to reverse it.  When a new dialog box opens, I want any previous one to close.  Can anyone refresh my memory?

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
7 hours ago, Mollymews said:

if for scripts then ScriptDialogLimitations

That's it!   Curiously, though, I apparently hadn't changed it myself.  According to LL's tables, the default value of that debug setting is supposed to be 0, which limits the number of dialog boxes per object.  Mine was set to 1, which limits to the number per channel.  When I just reset it by clicking the Reset to Default button, though, it stayed at 1.  So, LL must have changed the default at some point but not noted the change in their printed table.  (That 0 in the next to last column is the advertised default.)

86bb631650d0862760a0d2ef44c80ff6.png

In any case, changing the value to 0 does what I wanted, so thank you.  😉  Unfortunately, there's no way to force that behavior with a script, so I can't see how to incorporate it into a salable product. 

Share this post


Link to post
Share on other sites
  • 0

the only way I know how to force multiple same dialogs, is for each dialog call to have its own channel. Example:

list handles;

integer chan = -100;

default
{
    touch_start(integer num)
    {
        // channels are negative. handles are positive
        --chan;
        integer hnd = llListen(chan, "", llGetOwner(), "");

        handles += [chan, hnd];
        llDialog(llGetOwner(), (string)chan + " " + (string)hnd, ["Hello"], chan);
    }

    listen(integer channel, string name, key id,  string text)
    {
        // get handles index of this channel
        integer index = llListFindList(handles, [channel]);
    
        if (~index)
        {   
            // inform this channel and its listen handle
            integer hnd = llList2Integer(handles, index + 1);         
            llOwnerSay((string)channel + " " + (string)hnd);
            
            // remove listener for this channel
            llListenRemove(hnd);
            handles = llDeleteSubList(handles, index, index + 1);
        }
    }
}

 

Share this post


Link to post
Share on other sites
  • 0
4 minutes ago, Mollymews said:

the only way I know how to force multiple same dialogs, is for each dialog call to have its own channel.

Yeah, but that's the opposite of what I want.  I already have multiple dialog boxes open.  Every time I open one, it stacks up on top of the previous ones, until I have a dozen or more open at once.  I really just wanted to close any previous box as a new one opens.  Now that I changed that debug setting -- thank you again! -- it works.  It's just not going to work for anyone else who still has that debug setting at the default.

Share this post


Link to post
Share on other sites
  • 0

ah! yes. I dunno how to force a debug settings either

a way to manage this could be to insert a unique marker into the listen text for each instance of chan/hnd pair

handles = [chan, hnd, marker]

dialog buttons for example

1st touch: marker = 0.  Button text = "Blue"
2nd touch: with no listen response to 1st touch. Button text = "Blue 1"
3rd touch: Button text = "Blue 2"

Share this post


Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 169 days.

Please take a moment to consider if this thread is worth bumping.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...