Any chance we could have a way to query if there is any client data? I have
the same problem.
...... Original Message .......
···
On Mon, 18 Oct 2004 17:04:45 -0700 Robin Dunn <robin@alldunn.com> wrote:
Jorge Godoy wrote:
Hi!
I have a request for enhancement for wxPython when running on MS Windows
(any version, I believe, but I tested on 98 and XP only) with regards to
the methods GetClientData for wxChoice and wxComboBox.I'm running the latest stable release -- 2.4.2.4 -- on both Linux and
Windows. If I have aself.anychoicebox.Clear()
self.anychoicebox.Append('')
cd = self.anychoicebox.GetClientData(0)
if cd:
print cdI get an error saying that there's no ClientData for that object when
running on Windows. When running on Linux, I think wxGTK returns 'None'
since I have no problem with the above snippet of code.I'd like to have the same behaviour on both platforms. For now, as a
workaround, I'm doing "Append('', None)". It would be really nice if
the GetClientData returned None when it couldn't get any information.Is it a plausible request? Is it doable for the stable versions of
wxPython? Is it fixed in the development (2.5) series?The good news is that they are consistent in 2.5. The bad news is that
they both raise an exception. The reasoning is that None can be a valid
data object, not an error return indicator.--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org