[code][textadept] ui.dialogs.inputbox with multiple entries

From: Richard Philips <richard.philips.att.gmail.com>
Date: Mon, 17 Feb 2014 18:24:20 +0100

Hi Mitchell,

I found a problem in ui.dialogs.inputbox with multiple entries (textadept
7.2 beta)

So, when there are multiple entries and one of them is empty this empty is
*removed* from the input text (return value).
But this means that the 'informative_text' and the input text no longer

I see 2 solutions:

(1) in the case of multiple entries, do not remove empty fields but set
them to the empty string

(2) return 'informative_text' as third value (with corresponding entries
removed as well!)

As an example:

Please, fill in the fields:

     e-mail: rph.att.nowhere.com

informative_text = {'Please, fill in the fields:', 'Name:', 'e-mail:'}
text = {'',''}

options = {}
options['text'] = text
options['informative_text'] = info_text
options['title'] = 'Title'

local x, text = ui.dialogs.inputbox(options)

-- with the values as in the example

print #informative_text -- prints 3
print #text -- prints 1


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 Mon 17 Feb 2014 - 12:24:20 EST

This archive was generated by hypermail 2.2.0 : Tue 18 Feb 2014 - 06:40:55 EST