[wxPython] How to tack data onto a node of a tree?

Steve Lamb grey at despair.rpglink.com
Sat Aug 9 20:30:52 CEST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, 09 Aug 2003 18:03:52 -0000, Steve Lamb <grey at despair.rpglink.com> wrote:
>     I've read the documentation for wxTreeItemData and am a little
> confused.  Would something like the following work for assignment?
 
> dir = '/dir/to/file'
> file = 'filename'
> filepath = wxTreeItemData(dir + '/' + file)
> self.FileList.Append(dir_node, -1, -1, filepath)
 
>     I believe that the following would be used to retrieve the data?
> filepath = self.FileList.GetPyData(id)
 
    Well, I thought that wrestling with my program or building a test
case would take longer than it did.  Turns out I was able to make the
modifications quickly and it looks like I read the documentation
accurately.  Teach me to ask before trying, esp. when it comes to
Python.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/NT3cel/srYtumcURAjQ0AKC5J/P0JwSlM32koy9O9iPAKSTx9gCeIkfO
GCJRkpaASyTHAEg29xXT2Mk=
=me9C
-----END PGP SIGNATURE-----

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
       PGP Key: 8B6E99C5       | main connection to the switchboard of souls.
	                       |    -- Lenny Nero - Strange Days
-------------------------------+---------------------------------------------




More information about the Python-list mailing list