I am trying to create a combobox in which I use a list of characters which is every time different so I cannot use Glade to fill the liststore.
The language I program in is Ada but The Functions I use can certainly be recognized.
Therefore I create in glade a liststore with one empty column of the type gchar. Inside my program I did create a refill routine:
procedure Refill(Set : integer; max : integer) is
ch : character;
n1 : integer;
G_char : Gvalue;
Types : GType := (GType_Char);
n1 := 0;
for nn in 1 .. max loop
if not Grid(x_vak, y_vak).impossible(n1) then
ch := CHARACTER'Val(Symbols(n1 ,Set)); -- create a character from an ascii value of that character
Set_Char (G_Char, gchar(ch));
Set_Value (CH_List, CH_Iter, 0, G_Char);
n1 := n1 + 1;
The problem is that as I expected the combobox to show characters it showed me ASCII values of the characters.
What did I do wrong.
I have tried the same with null terminated strings but then I get a list of zero's.
The same with strings of one character