[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Hooks...
From: |
Richard Levitte |
Subject: |
Re: [Monotone-devel] Hooks... |
Date: |
Wed, 05 Sep 2007 14:47:52 +0200 (CEST) |
In message <address@hidden> on Wed, 5 Sep 2007 09:34:01 -0300, "Alex Queiroz"
<address@hidden> said:
asandroq> Hallo,
asandroq>
asandroq> On 9/5/07, Richard Levitte <address@hidden> wrote:
asandroq> >
asandroq> > So I've a proposal to make this easier, and it's to have a hook
asandroq> > registry in monotone, and changing the way hooks are implemented to
be
asandroq> > anonymous functions that are used as arguments to a registration
asandroq> > function, 'add_hook' perhaps?
asandroq> >
asandroq>
asandroq> Yeah, it's a good proposal. Give events names and then:
asandroq>
asandroq> add_hook(event, func) -- adds a hook and returns an id
asandroq> remove_hook(event, id) -- remove previously added hook
We need to think a few steps further, me thinks:
- What do we do with the values returned by the hook functions,
especially if one event has more than one hook function registered?
- Do we want to make it possible to give a priority to hook functions?
That would require a priority parameter to add_hook().
- Do we want a third function that returns information about a hook,
such as how many functions are attached and their identities (the id
returned by add_hook()), and whatever other data there may be.
- Do we want to be able to identify some hook functions by name?
Cheers,
Richard
-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.
--
Richard Levitte address@hidden
http://richard.levitte.org/
"When I became a man I put away childish things, including
the fear of childishness and the desire to be very grown up."
-- C.S. Lewis
- [Monotone-devel] Hooks..., Richard Levitte, 2007/09/05
- Re: [Monotone-devel] Hooks..., Stephen Leake, 2007/09/05
- Re: [Monotone-devel] Hooks..., Alex Queiroz, 2007/09/05
- Re: [Monotone-devel] Hooks...,
Richard Levitte <=
- Re: [Monotone-devel] Hooks..., Matthew Sackman, 2007/09/05
- Re: [Monotone-devel] Hooks..., Richard Levitte, 2007/09/05
- Re: [Monotone-devel] Hooks..., Alex Queiroz, 2007/09/05
- Re: [Monotone-devel] Hooks..., Matthew Sackman, 2007/09/05
- Re: [Monotone-devel] Hooks..., Stephen Leake, 2007/09/05
- Re: [Monotone-devel] Hooks..., hendrik, 2007/09/05
- Re: [Monotone-devel] Hooks..., Nathaniel Smith, 2007/09/05
- Re: [Monotone-devel] Hooks..., Richard Levitte, 2007/09/05
- Re: [Monotone-devel] Hooks..., Nathaniel Smith, 2007/09/05
- Re: [Monotone-devel] Hooks..., Stephen Leake, 2007/09/05