Sign up

Is it possible to disconnect a callback/slot added with a 'addOnXXX' method?

When connecting a signal in gtk in 'C' we can disconnect it later, after doing this in GtkD:

mbq.addOnClicked( (b) => Main.quit() );

Is it possible to disconnect it?

Thanks
A. Corbi

Re: Is it possible to disconnect a callback/slot added with a 'addOnXXX' method?

On 02/14/2014 12:13 PM, Antonio Corbi wrote:

When connecting a signal in gtk in 'C' we can disconnect it later, after doing this in GtkD:

`mbq.addOnClicked( (b) =>  Main.quit()  );`

Is it possible to disconnect it?

Thanks
A. Corbi

No, currently they can't be removed.

There is a onXXXListeners array for each signal, you could try removing
the unwanted delegate from it.