[JW Lua] Combining NumberedList and Number in the dialog
Jari Williamsson
jari.williamsson at mailbox.swipnet.se
Sat Sep 13 21:12:22 CEST 2014
Jan,
That's not yet supported for SetLists(). This has to do with a future
feature I had in mind. However, I might abandon that idea and if that's
the case, I could modify SetLists() to allow it.
If you don't have more items than in your example code, you can make the
list as arguments instead, like in the sample below:
---
local dialog = finenv.UserValueInput()
dialog.Title = "Dialog title"
dialog:SetTypes(dialogTypes)
dialog:SetLists({"aa","bb"}, nil, {"aa","bb"}, nil, {"aa","bb"}, nil)
dialog:SetDescriptions(dialogDescriptions)
dialog:SetInitValues(dialogInitValues)
local returnvalues = dialog:Execute()
---
Best regards,
Jari Williamsson
On 2014-09-09 13:22, Jan Angermüller wrote:
> Jari,
>
> is it possible to combine NumberedList and Number types in the dialog ?
> I was successful in creating several NumberedList entries OR several
> Number entries for the dialog,
> but was not successful in the combination of them:
> When I use NumberedList, Number, NumberedList, Number,
> dialog:Execute() returns the error message "Non-number in a list item of
> a "Number" type".
>
> When setting the lists with SetLists, I add an array for the
> NumberedList and a nil for the Number.
>
> The code snippet is below.
>
> Jan
>
> local dialogTypes={}
> local dialogLists={}
> local dialogDescriptions={}
> local dialogInitValues={}
>
> local displaylist = {"aa","bb"}
> local numelements=3
> local i=1
> while i <= numelements do
> table.insert(dialogTypes,"NumberedList")
> table.insert(dialogTypes,"Number")
> table.insert(dialogLists,displaylist)
> table.insert(dialogLists,nil)
> table.insert(dialogDescriptions,i..".) Element 1")
> table.insert(dialogDescriptions,i..".) Element 2")
> table.insert(dialogInitValues,1)
> table.insert(dialogInitValues,1)
> i=i+1
> end
>
> local dialog = finenv.UserValueInput()
> dialog.Title = "Dialog title"
> dialog:SetTypes(dialogTypes)
> dialog:SetLists(dialogLists)
> dialog:SetDescriptions(dialogDescriptions)
> dialog:SetInitValues(dialogInitValues)
> local returnvalues = dialog:Execute()
>
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>
More information about the JWLua
mailing list