gre.remove event listener

gre.remove_event_listener(
    id
)

Remove an event listener created with gre.add_event_listener.

Parameters:
            id    An identifier returned from gre.add_event_listener
Example:
-- Create a listener to log redraw events
local lid = gre.add_event_listener("gre.redraw", function(mapargs) gre.log(-1, "redraw!") end)

-- Remove the listener if it exists
if lid ~= nil then
    gre.remove_event_listener(lid)
end
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.