Deutsch   English   Français   Italiano  
<ve407k$2865q$2@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Manfred Stelzhammer <manfred@antispam.at>
Newsgroups: comp.lang.tcl
Subject: Re: tablelist itemtodict
Date: Tue, 8 Oct 2024 21:12:52 +0200
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <ve407k$2865q$2@dont-email.me>
References: <ve3m5v$2865q$1@dont-email.me> <ygar08qfsjl.fsf@akutech.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 08 Oct 2024 21:12:53 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="e3ec796bf59b581aba32465715767c90";
	logging-data="2365626"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18WMSWbM4aw4Zmhy+BLs5QXaXcTCLqrhTw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:E8GWPDqfLgQhZX+ksoP87zl5RBU=
Content-Language: en-US
In-Reply-To: <ygar08qfsjl.fsf@akutech.de>
Bytes: 2495

Hi

Thank's for your answer.

I know, that I don't get the values from the table,
but I thought the first row is the first item.
The first row has the values "nix0 5 p-4 o0".

I set the variable ::nix with {{nix0 5 p-4 o0} {nix11 6 p-3 o2}}
which is the listvariable of the table an which is shown in the first 
row in the table.

I'll ask another question.
Who can I get all values of a row from the table with the columnnames?

with: ".tbl rowcget 0 -text" I only get the value, but I'll get the 
columnname and the values like a dict.


regards

Manfred


Am 08.10.24 um 18:50 schrieb Ralf Fassel:
> * Manfred Stelzhammer <manfred@antispam.at>
> | puts "itemtodict : [.tbl itemtodict 0]"
>>
> | the puts command show me: % itemtodict : col0 0 col1 {} col2 {} col3 {}
>>
> | I expected that I get "col0 nix0 col1 5 col2 p-4 col3 o0".
>>
> | I'll get all values from a row with columnname like a dict.
>>
> | What do I wrong or I don't understand?
> 
> If I understand the 'itemtodict' command correctly, it will not return
> the values of the *table*, but from the *item* you passed to it.
> 
>    https://www.nemethi.de/tablelist/tablelistWidget.html#itemtodict
>    [...]
>    The dictionary's keys will be column numbers or names, and the values
>    will be the corresponding elements of the given item.
>    [...]
> 
> Since the only value in the item is '0', you get empty strings for the
> rest.
> 
> HTH
> R'