xrc and wxMaskedNumCtrl

forget it, i found that using foreign control
(class=unknown) and attach the resource (wxMaskedNumCtrl) on
runtime did the trick.

Monday, March 1, 2004, 10:54:46 AM, you wrote:

···

has anyone succeded in getting
wxMaskedNumCtrl works using
xrc-based layout? I tried setting
class=wxMaskedNumCtrl, but
said no handler for that class.

also tried setting <class=wxTextCtrl
subclass=MyCustomControl.wxMaskedNumCtrl>, where
MyCustomControl.wxMaskedNumCtrl is:

class
MyMaskedNumCtrl(wx.lib.maskednumctrl.MaskedNumCtrl,Prop):
    def __init__(self):
        p = wx.PreTextCtrl()
        self.this = p.this
        self._setOORInfo(self)

the form is loaded properly with no error. but when I tried
to SetValue the field, this error appears:

10:31:18.: File
"C:\PYTHON23\lib\site-packages\wxPython\lib\maskednumctrl.py",
line 1057, in SetValue
10:31:18.: wxMaskedTextCtrl.SetValue(
self, self._toGUI(value) )
10:31:18.: File
"C:\PYTHON23\lib\site-packages\wxPython\lib\maskednumctrl.py",
line 1315, in _toGUI
10:31:18.: if not self._allowNegative and value < 0:
10:31:18.: AttributeError: MyMaskedNumCtrl
instance has no attribute '_allowNegative'

this probably caused by xmlresourcehandler for wxtextctrl
did not call
maskednumctrl.wxMaskedNumTextCtrl's __init__. i
could just call the method my self at
MyMaskedNumCtrl.__init__, but it requires pointer to parent,
which at method, is not exist yet from parameter.

help plez...