https://docs.wxpython.org/wx.Validator.html
mentions subclasses of text, integer and floating point validators, but I get a “no attribute” error when I try to use them.
https://docs.wxpython.org/wx.Validator.html
mentions subclasses of text, integer and floating point validators, but I get a “no attribute” error when I try to use them.
They excluded on purpose, IIRC because they rely on being able to have access to C++ types in other classes by address, which is not a good fit for the Python way of doing things, and especially when dealing with wrapped C++ classes. The main purpose for using the validators in that way is for data transfer from the widget to/from the value’s storage place, not just for validation.
OTOH, implementing type-specific validators in Python is super easy and so having special classes for it is not a necessity. Check in the demo for a couple examples.
On Sunday, May 26, 2019 at 11:18:48 AM UTC-7, ABC wrote:
mentions subclasses of text, integer and floating point validators, but I get a “no attribute” error when I try to use them.
–
Robin