On Fri, Apr 24, 2009 at 12:35, Julien Danjou <jul...@danjou.info> wrote:
> I'd have a probably better sugestion; add missing attributes in __index
> metafunction of key object to retrieve the modkeys, key, keypress
> function, etc.
> I will handle this piece of code.

Yes, this is the limitation that causes the problem, that would indeed
be very nice.

>> +local data = {}
>> +local def = {}
>
> I think you want this as weaktable or you will keep the object for ever
> and will use memory for nothing.

Indeed.

http://git.mercenariesguild.net/?p=awesome.git;a=commitdiff;h=25bb703cc607ef829809834535c5478e7cb59e67

>> +--- Get a filtered list of objects and their descriptions
>> +-- @param filter Table with keys to be matched (optional). The values are
>> +-- matched using string.find so you can use non-exact/regex strings.
>> +-- @return Table of all descriptions that match the filter
>> +function list(filter)
>
> Filtering is bad this way.
> You should use a callback function as filter, with the data item as args
> probably.

I'm not 100% sure what you mean here, you didn't give an explicit
reason why it's but from what I understand you don't want the filter
function hardcoded like this. We can give possibility of supplying a
custom function like this (any better?):
http://git.mercenariesguild.net/?p=awesome.git;a=commitdiff;h=ceb8555b2ec5ce510ab18610a6e678277dcc9bef

Cheers,
koniu

-- 
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.

Reply via email to