Difference between revisions of "Ignored"

From Second Life Wiki
Jump to navigation Jump to search
Line 5: Line 5:
|func_energy
|func_energy
|event=ignored
|event=ignored
|p1_type=integer|p1_name=channel|p1_desc=The channel on which the dialog was opened
|p1_type=key|p1_name=id|p1_desc=The agent that clicked the ignore button.
|p2_type=integer|p2_name=channel|p1_desc=The channel on which the dialog was opened


|event_desc= ignored() Sent as a result of the user clicking ignored in a dialog
|event_desc= ignored() Sent as a result of the user clicking ignored in a dialog

Revision as of 23:25, 6 January 2009

Emblem-important-yellow.png LSL Feature Request
The described event does not exist. This article is a feature request.

Description

Event: ignored( key id, integer channel ){ ; }

ignored() Sent as a result of the user clicking ignored in a dialog

• key id The channel on which the dialog was opened
• integer channel

Specification

Currently there is no way to tell if a dialog has been ignored. Scripts rely on timer events to decide when to stop listening on a channel. This can lead to delays for the user while a state is waiting for a timer event. Conversely it also leads to confusion when a user tries to click a button of a dialog that has stopped listening. This proposed event would go a long way towards alleviating the problem without breaking existing implementations.

Caveats

There is no way to tell which dialog sent the ignored event since dialogs cannot be identified. The channel number could be in use by more than one dialog. It is merely an attempt to give some useful information to the script.

All Issues ~ Search JIRA for related Bugs

Examples

<lsl> integer channel = -1000; integer listen_handle;

default {

   state_entry()
   {
       listen_handle  = llListen(channel,"", "","");
   }

   touch_start(integer count)
   {
       llDialog(llDetectedKey(0), "This is a test dialog.\n\nPlease choose one of the below options.",
                ["Yes", "No", "0", "1"], channel);
   }

   listen(integer chan, string name, key id, string mes)
   {
       if(id == llGetOwnerKey(id))//won't listen to objects unless they aren't in the region.
           llSay(0,name + " (" + (string)llGetObjectDetails(id, (list)OBJECT_POS) + ") chose option " + mes);
   }
   ignored(integer c)
   {
       if(channel == c)
       {
           llListenRemove(listen_handle);
       }
   }

} </lsl>

Notes

PJIRA feature request SVC-3624

Deep Notes

Signature