Re: .text insert $string
From: Bryan Oakley (bryan_at_bitmover.com)
Date: 04/04/04
- Next message: Benjamin Riefenstahl: "Re: makefile for compiling ready-made tcl callable C source"
- Previous message: Frederick Shorts: "Re: AD: More MONEY more DATES"
- In reply to: blacksheep: "Re: .text insert $string"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 04 Apr 2004 14:43:32 GMT
blacksheep wrote:
> Il 2004-03-30, Bryan Oakley <bryan@bitmover.com> ha scritto:
>
>
>>say it is. For one, this line is almost certainly a coding error:
>>
>> set $string "le mie vane parole"
>
>
> Alright, I got wrong transcribing into the newsreader to
> simplificate the expression for my trouble.
Rule of thumb: always test your code snippets before posting them. We
often can't fix problems if we can't duplicate them.
> But problem
> remains: how can I get to output "le mie vane parole" , and not
> $string , while I perform something like:
>
> $w.text insert end $string d1 ?
>
Exactly as you show above (without the trailing question mark)
$w.text insert end $string d1
That absolutely will work. If it's not working you're omitting certain
facts. Either "$string" contains the value "$string", you're putting
curly braces around the $string, or there's something else weird going on.
My suggestion: start in a fresh interpreter and type in the following code:
set w ""
text $w.text
pack $w.text
set string "le mie vane parole"
$w.text insert end $string
You should see "le mie vane parole" show up in the text widget. That
proves the above code works. Now the trick is to figure out how your
code is different from the above code.
It would really help if you could show your actual code in a way where
we can reproduce the problem.
- Next message: Benjamin Riefenstahl: "Re: makefile for compiling ready-made tcl callable C source"
- Previous message: Frederick Shorts: "Re: AD: More MONEY more DATES"
- In reply to: blacksheep: "Re: .text insert $string"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|