Difference between revisions of "Ignored"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{LSL_Event |event_id |mode=request |func_sleep |func_energy |event=ignored |p1_type=integer|p1_name=channel|p1_desc=The channel on which the dialog was opened |event_desc= ignored() Sent...)
 
Line 49: Line 49:
|related
|related
|also
|also
|notes
|notes=PJIRA feature request [http://jira.secondlife.com/browse/SVC-3624 SVC-3624]
}}
}}

Revision as of 11:39, 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( integer channel ){ ; }

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

• integer channel The channel on which the dialog was opened

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