comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Filling a listsore  real time
Date: Mon, 10 Feb 2014 11:28:26 +0100
Date: 2014-02-10T11:28:26+01:00	[thread overview]
Message-ID: <11a6gmazag0bo.1w3j3ovw2nb1h.dlg@40tude.net> (raw)
In-Reply-To: 52f89f1a$0$7148$703f8584@news.kpn.nl

On Mon, 10 Feb 2014 10:41:03 +0100, ldries46 wrote:

> Thanks for the solution. Because I have only single characters in the rows
> I used the following code
> The column in defining the liststore was set to gchar
> 
> Clear(CH_List); -- starting with an empty liststore
> n1 := 0;
> for nn in 1 .. max loop
>    if not Grid(x_vak, y_vak).impossible(n1. ) then
>       ch := CHARACTER'Val(Symbols(n1 ,Set));
>       Init(G_Char, GType_Char);
>       Set_Char (G_Char, gchar(ch));
>       append(CH_List, CH_Iter);
>       Set_Value (CH_List, CH_Iter, 0, G_Char);
>       Unset (G_Char);
>    end if;
>    n1 := n1 + 1;
> end loop;
> 
> I expected the result to be a list of characters,

I don't understand this. List store is not a list it is a tree model where
all rows are siblings.

> instead I got a list of 
> ASCII values (exactly the values I had in Symbols(n1 ,Set)) so I know the 
> values are at the correct location but the are not presented as I would 
> like.

Presented by what? By a cell renderer? Which renderer? There are many cell
renderers. If you want to render characters as texts you should use a text
renderer and GType_String. I have no idea how text renderer is supposed to
render GType_Char, probably as a number.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

      reply	other threads:[~2014-02-10 10:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-09 15:13 Filling a listsore real time ldries46
2014-02-09 17:16 ` Dmitry A. Kazakov
2014-02-10  9:41   ` ldries46
2014-02-10 10:28     ` Dmitry A. Kazakov [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox