puts "_string is $_string"
$argW delete "insert -$_lastWordSize c" insert
$argW insert insert $_string
The output of puts:
# ==============================================\n\n
What is inserted into the text widget:
# ==============================================\\n\\n
Why?
The actual code is too large and spread across multiple files to be
posted here, but those three lines really are in that exact sequence.
Luc <luc@sep.invalid> wrote:
puts "_string is $_string"
$argW delete "insert -$_lastWordSize c" insert
$argW insert insert $_string
The output of puts:
# ==============================================\n\n
What is inserted into the text widget:
# ==============================================\\n\\n
Why?
Too little info provided -- and code that does not run -- for us to
tell much.
The actual code is too large and spread across multiple files to be
posted here, but those three lines really are in that exact sequence.
Then try posting an actual small working sample here. The code you
have posted does not run (three variables are undefined -- and we are
not told their contents). And the code is 100% dependent upon the
contents of those variables, esp. the _string variable.
And your annotations are also incorrect, because the puts in the code
shown above would output something like "_string is blah" not "# =====...\n\n".
Most likely the contents of _string is not what you think it is at the
time your delete and insert's are actually called.
And your annotations are also incorrect, because the puts in the code
On Mon, 24 Apr 2023 01:32:18 -0000 (UTC), Rich wrote:
Luc <luc@sep.invalid> wrote:
puts "_string is $_string"
$argW delete "insert -$_lastWordSize c" insert
$argW insert insert $_string
The output of puts:
# ==============================================\n\n
What is inserted into the text widget:
# ==============================================\\n\\n
Why?
Too little info provided -- and code that does not run -- for us to
tell much.
The actual code is too large and spread across multiple files to be
posted here, but those three lines really are in that exact sequence.
Then try posting an actual small working sample here. The code you
have posted does not run (three variables are undefined -- and we are
not told their contents). And the code is 100% dependent upon the
contents of those variables, esp. the _string variable.
And your annotations are also incorrect, because the puts in the code
shown above would output something like "_string is blah" not "#
=====...\n\n".
Most likely the contents of _string is not what you think it is at the
time your delete and insert's are actually called.
I know that the string is {# ==============================================\n\n}
The code sequence is the one I posted. There is no way the content
of the $_string variable could be changed between the first and the
third line.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 498 |
Nodes: | 16 (0 / 16) |
Uptime: | 64:53:25 |
Calls: | 9,813 |
Calls today: | 1 |
Files: | 13,754 |
Messages: | 6,189,222 |