Ticket #253 (closed enhancement: fixed)

Opened 1 year ago

Last modified 2 months ago

__disconnect__ (analog to __connect__) interface

Reported by: Lalo Martins <lalo.martins@gmail.com> Assigned to: cederberg@gmail.com
Priority: normal Milestone: MochiKit 1.4
Component: component1 Version:
Severity: normal Keywords:
Cc:

Description

My use case is: I have a small library that wraps Google, Yahoo, etc maps. I'm very happy that I don't need to listen for events I don't need; I can call GEvent.bind() or its analogue on the connect method. But I never "unlisten", since there is no disconnect. (Actually, I did an ugly hack on the event handler to check if the event is disconnected, but that's not quite ideal.)

Attachments

MochiKit.__disconnect__.diff (0.6 kB) - added by Lalo Martins <lalo.martins@gmail.com> on 05/25/07 19:19:37.
patch with simple implementation

Change History

05/25/07 19:19:37 changed by Lalo Martins <lalo.martins@gmail.com>

  • attachment MochiKit.__disconnect__.diff added.

patch with simple implementation

05/19/08 12:57:04 changed by cederberg@gmail.com

  • owner changed from somebody to cederberg@gmail.com.
  • milestone set to MochiKit 1.4.

Nice suggestion with a patch. I'm moving this ticket to 1.4 to not forget about it.

05/20/08 03:25:03 changed by cederberg@gmail.com

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [1378]. The disconnect method added will take a few more arguments that in the patch provided, though.