Tk::SignalSlot provides an alternative to Tk::bind that is more similar to Qt's signal/slot mechanism. The main idea is that multiple callbacks can now be bound to one event. This allows for a more modular and object-oriented approach to Tk::bind which results in simpler, and easier to maintain code.

This method connects the given callback to the event. This means that when the event is triggered, this callback will be executed. Any number of callbacks can be connected to any one event. When the event fires, all connected callbacks will execute in the order they were connected. event is any valid Tk event, and callback is any valid Tk callback.

Upon success, this method returns a unique ID that can be used in the disconnect() method below.

Given a valid ID (returned by the connect() method), this method disconnects the associated callback from the event. Obviously, this means that when the event fires, this callback will not be executed.

If you decide to use Tk::SignalSlot, then you should stick with it thoroughtout your program. Intermixing Tk::SignalSlot with Tk::bind can have some unpredictable effects since Tk::SignalSlot uses Tk::bind internally.