I am generating the input to the yad --list command by getting data from various files and pulling things out of arrays. one column has phrases i.e multiple words so they have to be enclosed in quotes to be seen as a single entry.
I artificially generated the data for the test below to simplify the problem and I can't get it to work.
The following works:
yad --list --radiolist --fontname='Sans Bold 15' --undecorated \ --column=Tick --column=Item --column=Location --column=Description \ --fore="green" --center --height=300 --width=600 \ --button="Different Item:1" --button="Quit:0" \ --justify="left" false 1 HOME 'Test 1' false 2 NOTHOME 'Test 2'
But neither of these work properly:
Tick="false"
Item="1"
LocationFound="HOME"
Desc="Test 1"
DataInput+=" $Tick"
DataInput+=" $Item"
DataInput+=" $LocationFound "
DataInput+=${Desc@Q} # to preserve quotes
DataInput+=" "
#
Item="2"
LocationFound="NOTHOME"
Desc="Test 2"
DataInput+=" $Tick"
DataInput+=" $Item"
DataInput+=" $LocationFound "
DataInput+=${Desc@Q}
DataInput+=" " # to preserve quotes
#
echo $DataInput
#
yad --list --radiolist --fontname='Sans Bold 15' --undecorated \
--column=Tick --column=Item --column=Location --column=Description \
--fore="green" --center --height=300 --width=600 \
--button="Different Item:1" --button="Quit:0" \
--justify="left" $DataInput
#
yad --list --radiolist --fontname='Sans Bold 15' --undecorated \
--column=Tick --column=Item --column=Location --column=Description \
--fore="green" --center --height=300 --width=600 \
--button="Different Item:1" --button="Quit:0" \
--justify="left" <<< echo $DataInput
Running the second script shows that the echo command echoes the data correctly for yad.
I find no examples of using --list on the net that uses multiple columns where one contains phrases nor any that show generating the data for the yad list.
I am generating the input to the yad --list command by getting data from various files and pulling things out of arrays. one column has phrases i.e multiple words so they have to be enclosed in quotes to be seen as a single entry.
I artificially generated the data for the test below to simplify the problem and I can't get it to work.
The following works:
yad --list --radiolist --fontname='Sans Bold 15' --undecorated \ --column=Tick --column=Item --column=Location --column=Description \ --fore="green" --center --height=300 --width=600 \ --button="Different Item:1" --button="Quit:0" \ --justify="left" false 1 HOME 'Test 1' false 2 NOTHOME 'Test 2'But neither of these work properly:
Running the second script shows that the echo command echoes the data correctly for yad.
I find no examples of using --list on the net that uses multiple columns where one contains phrases nor any that show generating the data for the yad list.