Re: [code] [textadept] ui.dialogs

From: Mitchell <m.att.foicica.com>
Date: Tue, 14 Jan 2014 22:10:39 -0500 (EST)

Hi Richard,

On Tue, 14 Jan 2014, Richard Philips wrote:

> Hi Mitchell,
>
> ui.dialogs offers a comprehensive widget library for textadept.
>
> If I may suggest an addition :-)
>
> The most basic way to extend Lua is by invoking a Lua function with a number
> of arguments.
> Often these arguments are strings (or numbers or booleans).
> Some of these arguments can be specified by the context, some has to be asked
> to the user of textadept.
>
> If there is only one argument the user has to specify, I typically use
> 'inputbox' with the right parameters.
> If there are more arguments, I use an `editable textbox` with a list of the
> required argument labels.
> I parse the answer and I can invoke the function with the right arguments.
>
> This last approach is quite clumsy and error-prone.
> A lot better would be if the widget itself could separate labels from input.
>
> I'm not arguing for a full-blown form builder, *just* that the 'one-line'
> inputbox could be augmented to 'multiple-lines'.

Would a textbox work for you? You could parse by line. I know it's not
ideal, but it might be less error-prone and more intuitive.

> I fully understand that this is not a trivial request (and remember: I have a
> decent solution),
> but I really think this would lead to a nice addition to textadept with a lot
> of potential use.

Yes this is not trivial to implement. It also begs some questions. Should
there be labels next to each inputbox? If so, how should the API declare
them? How should it return the values from all inputboxes?

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 14 Jan 2014 - 22:10:39 EST

This archive was generated by hypermail 2.2.0 : Wed 15 Jan 2014 - 06:31:21 EST