Can't delete first line from listbox
From: Kevin Walzer (sw_at_wordtech-software.com)
Date: 02/26/05
- Next message: Kevin Walzer: "Re: Can't delete first line from listbox"
- Previous message: George Petasis: "Re: Error in Tcl documentation?"
- Next in thread: Kevin Walzer: "Re: Can't delete first line from listbox"
- Reply: Kevin Walzer: "Re: Can't delete first line from listbox"
- Reply: scdtl_at_yahoo.com: "Re: Can't delete first line from listbox"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 26 Feb 2005 12:39:42 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm trying to massage a list for insertion in a listbox, but I can't
delete the first line, which isn't part of the list. What I'm doing is
listing installed programs from a package manager, then piping the
output to the listbox.
When the list is piped to stdout, it looks something like this:
Installed programs:
foo
foo1
foo2
foo3
What I want to do is delete the line "installed programs." However,
nothing I try is working. When I try something like ".listbox insert end
$list", I get this output:
Installed
foo
foo1
...
When I try ".listbox insert 1 $list," I get this:
foo
foo1
foo2
...
Installed
I've even tried ".listbox insert end $list; $listbox delete 0," thinking
that might just shear off the top line--but that doesn't work either.
I've also tried various methods for parsing the "Installed" line from
the list before it's inserted to the listbox, but that mangles
everything, so I don't think that's a productive approach.
Can anyone help? I'm stumped.
- --
Cheers,
Kevin Walzer, PhD
WordTech Software--Open Source Applications and Packages for OS X
http://www.wordtech-software.com
http://www.smallbizmac.com
http://www.kevin-walzer.com
mailto:sw@wordtech-software.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCILReJmdQs+6YVcoRAsG5AJ9XXAF/USI/rx/pC9XFACciqvbgmgCZAVOh
rSHVMJ3Hi9+lJgQDn/SsGtw=
=7hjx
-----END PGP SIGNATURE-----
- Next message: Kevin Walzer: "Re: Can't delete first line from listbox"
- Previous message: George Petasis: "Re: Error in Tcl documentation?"
- Next in thread: Kevin Walzer: "Re: Can't delete first line from listbox"
- Reply: Kevin Walzer: "Re: Can't delete first line from listbox"
- Reply: scdtl_at_yahoo.com: "Re: Can't delete first line from listbox"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|