From: michael libby Date: 2002-08-08T12:47:09+09:00 Subject: Re: Bug in TkText -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 07 August 2002 21:08, Albert Wagner wrote: > Ruby-1.6.7;Tcl/Tk-8.3.4 > This sample code fails: > > require 'tktext' > text = TkText.new > text.insert('end', "abcdefghijklmno") > tag1 = TkTextTag.new(text, 'foreground' => 'red') > tag2 = TkTextTag.new(text, 'foreground' => 'blue') > tag1.add('1.0', '1.4') > tag2.add('1.6', '1.7') > tag1.add('1.10', '1.14') > text.dump('tag', '1.0','1.14') > > Does anyone know a workaround? TkText#dump method wants a block it seems. Try something like: text.dump('tag', '1.0', '1.14'){|x| puts x} which gives: tagon tag0000 1.0 tagoff tag0000 1.4 tagon tag0001 1.6 tagoff tag0001 1.7 tagon tag0000 1.1 Enjoy. -michael ++++++++++++++++++++++++++++++++++++++++++ Michael C. Libby public key: http://www.ichimunki.com/public_key.txt web site: http://www.ichimunki.com ++++++++++++++++++++++++++++++++++++++++++ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9UedJ4ClW9KMwqnMRAqtjAJ42Jc7BlwIFb3MziLMBfu7cgnk8kACfSdgn 74VsPYsSEKtQG1CY0vzeejE= =0lqa -----END PGP SIGNATURE-----