Skip to content

__dellistener__

builtin · libnexusinterp/corefcn/graphics-proprietary.cc

: __dellistener__ (h, prop, fcn)
: __dellistener__ (h, prop)
: __dellistener__ (h, prop, "persistent")

Remove fcn from the listeners registered on the property prop of the graphics object h.

fcn must be the very same variable that was given to addlistener, not merely another value that happens to be equal to it.

If fcn is omitted, every listener on prop is removed. If the keyword "persistent" is supplied in its place, both the persistent and the ordinary listeners on prop are removed.

Example:

function my_listener (h, dummy, p1)
  fprintf ("my_listener called with p1=%s\n", p1);
endfunction

c = {@my_listener, "my string"};
addlistener (gcf, "position", c);
dellistener (gcf, "position", c);