David Woods wrote:
As a small part of a much larger application, I have a file management
utility which, like an FTP utility, displays two sides with drive controls
(implemented using wx.GenericDirCtrls), file lists, etc. Because the two
GenericDirCtrls both need to manipulate the embedded tree controls, I had to
change the Ids of both trees using the SetId() method. This allowed me to
tell, in a single method, which control was being manipulated. Everything
worked perfectly under wxPython 2.4.2.4.However, because of cross-platform issues, I had to upgrade to wxPython
2.5.1.5, which is generally an improvement and I'm happy to have made the
upgrade. However, my file management utility no longer works. If I leave
it untouched, I cannot open the branches of the GenericDirCtrl's trees. If
I remove the SetId()'s, I can open the branches of the GenericDirCtrls, but
I can no longer tell which control is being worked with (as they both have
the same event.GetId() value of 7000) and I can no longer display the
appropriate folder contents on the proper side of the utility.Is this something that can be fixed relatively easily?
Two possibilities:
* Instead of binding your event handlers to the common parent of both GenericDirCtrl's bind it to the GenericDirCtrl itself, or something in-between that will still let you know which one it came from based on the heriarchy.
* Use GetEventObject in your event handler and compare it with self.sourceDir.GetTreeCtrl() or self.destDir.GetTreeCtrl().
ยทยทยท
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!