Public bug reported:
It would be very useful for scripting to have a way to unregister an
event handler, so you could script "one run" event handlers and such.
For example, if I wanted to script something to happen when I arrived at
a destination, I could do:
registerAnonymousEventHandler("mmapper arrived", "my_function")
function my_function(event, room)
if room == "room I want" then
unregisterEventHandler("mmapper arrived", "my_function")
<do stuff I want to do in this room>
end
end
** Affects: mudlet
Importance: Wishlist
Status: New
--
You received this bug notification because you are a member of Mudlet
Makers, which is subscribed to Mudlet.
https://bugs.launchpad.net/bugs/1180168
Title:
unregisterEventHandler()
Status in Mudlet the MUD client:
New
Bug description:
It would be very useful for scripting to have a way to unregister an
event handler, so you could script "one run" event handlers and such.
For example, if I wanted to script something to happen when I arrived
at a destination, I could do:
registerAnonymousEventHandler("mmapper arrived", "my_function")
function my_function(event, room)
if room == "room I want" then
unregisterEventHandler("mmapper arrived", "my_function")
<do stuff I want to do in this room>
end
end
To manage notifications about this bug go to:
https://bugs.launchpad.net/mudlet/+bug/1180168/+subscriptions
_______________________________________________
Mailing list: https://launchpad.net/~mudlet-makers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~mudlet-makers
More help : https://help.launchpad.net/ListHelp