Re: API Changes

From: mitchell <mforal.n....at.gmail.com>
Date: Mon, 14 Jun 2010 15:15:51 -0700 (PDT)

Robert,

> >> core/events.lua: How about adding a function for removing an event handler with
> >> defaulting to removing the first one:
> >> function disconnect(event, index)
> >>   local plural = event..'s'
> >>   local handlers = events[plural]
> >>   if index then
> >>     table.remove(handlers, index)
> >>   else
> >>     table.remove(handlers, 1)
> >>   end
> >> end
>
> > What would be a use case? As it is, there is no way to check if a
> > particular handler is at a particular index.
>
> I use
> table.remove(textadept.events['keypresss'], 1)
> in my rectangular selection and enclosing functions.

Okay. In hg r597.

Mitchell

>
Received on Mon 14 Jun 2010 - 18:15:51 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:47:49 EST