Ticket #299 (closed enhancement: wontfix)

Opened 7 months ago

Last modified 5 months ago

Drop Signal's dependency on Style

Reported by: fblomqvist@gmail.com Assigned to: somebody
Priority: normal Milestone: MochiKit 1.4
Component: component1 Version:
Severity: normal Keywords:
Cc:

Description

The signals module is currently dependent on the Style module. But on inspecting the code it seems the only connection is the tiny 'coordinates' object used in two places/lines. I suggest this is removed and replaced with a simple literal obj. This would reduce the size (ca 13kb) for applications not needing the Style module.

Regards // Fredrik

Change History

05/19/08 12:39:43 changed by cederberg@gmail.com

  • status changed from new to closed.
  • resolution set to wontfix.
  • milestone set to MochiKit 1.4.

Thanks for your suggestion! I can see your point and fully agree with removing dependencies where we can. However, the API for MochiKit.Signal.Event.mouse() clearly states that "page is a MochiKit.Style.Coordinates object". So, the MochiKit 1.3.1+ API:s basically mandate that we use the actual Coordinates object and not just a plain data object:

http://mochikit.com/doc/html/MochiKit/Signal.html#fn-mouse

Perhaps one could argue for moving Coordinates somewhere else, as it is probably useful in various other places. But then again, most users of MochiKit will also use MochiKit.Style (if not almost everyone). I don't think removing this particular dependency is worth the tradeoff in breaking and/or changing the public API.

Please discuss this issue on the mailing list if you don't agree with my assessment here. I'm closing this ticket with "wontfix" for now.