IpAddrCtrl.SetValue() problems
rob
400440 at excite.com
Fri Oct 8 03:24:39 EDT 2004
Hello! :)
I'm relatively new to python so bear with me. I have run into a
problem with IPAddrCtrl and can't seem to find any info on google etc.
Here is a code snippet from my app and the error. I just want to set
a default value in the IP address field from a variable read from a
config file is all...
CODE:
(just the important bits)
NOTE: I changed the 2nd import a little to make it more ovbious that I
was using masked.IPAddrCtrl in the code.
-----------
#from wx.lib.maskededit import IpAddrCtrl ## old import format
import wx.lib.masked as masked
self.ip = masked.IpAddrCtrl(self, -1, style = wx.TE_PROCESS_TAB)
self.ip.SetValue(config.Get("ipaddress"))
-----------
ERROR:
Traceback (most recent call last):
File "mydlg.pyo", line 787, in IPAddrDialog
File "mydlg.pyo", line 240, in __init__
File "wx\lib\masked\ipaddrctrl.pyo", line 148, in SetValue
NameError: global name 'types' is not defined
Oh and I'm using wxpython 2.5.2.8u and Python 2.3.4. I did have this
working with the previous version of wxpython (2.5.1.5u) and I have
changed the imports accordingly (I think). Can anyone help me out
with this as I have been stuck on this for a few days now.
Thanks
-Rob
More information about the Python-list
mailing list