Re: [textadept] Re: Questions and suggestions

From: mitchell <>
Date: Sat, 9 Jul 2011 19:52:08 -0400 (EDT)


On Sat, 9 Jul 2011, anton wrote:

> ok, thanks.
> then I have ask following
> if I want to add a module that uses localization
> how can I do this without providing patches for
> _USERHOME..'/locale.conf'
> (obviously, I dare not touch core)
> and not getting No Localization Menu items.
> What is the canonical way to do this?

You can't; you would have to maintain your own _USERHOME..'/locale.conf'.

>> The statusbar is updated on every keypress, mouse click, etc. so looping
>> through a table, calling a function, and concatting a string to itself
>> would be a slow and CPU intensive process.
>> It's probably easier, and faster, to hook your own events.UPDATE_UI event
>> that updates the docstatusbar after the original.
> Performance is of course a good point. So if I want to add something
> to the
> docstatusbar I simply need to copy-paste the code from core/gui.lua,
> modify it, add my stuff, and hook it again. But then if somebody else
> wants
> to add something, he will need to do the same thing with my code.
> Looks too ad hoc to me.
> There should be a better solution which balances flexibility and
> performance
> but I'm not smart enough to suggest one. Anyway.

While it is a bit ad-hoc, there would only be at most 2 statusbar update
event handlers, the original and any modification of the original, yours,

If you do come up with such a way to balance flexibility and performance,
I'd love to hear it. Thanks for the input.

Received on Sat 09 Jul 2011 - 19:52:08 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 12:13:19 EST