Ed,

So the change for ticket #1160 works beautifully.  However, I have
another problem.  I created a dOkCancelDialog with the CD.  In the
forms __init__ function, I set the variable partBizobj in the
dOkCancelDialog to the bizobj I want to reference.  Then, I set some
of the dTextBox controls' DataSources to self.Parent.partBizobj.  You
think it should reference Parent just fine.  However, I run my form
and I get the following traceback:

Traceback (most recent call last):
  File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\dGrid.py", li
ne 3744, in __onWxMouseLeftDoubleClick
    self.raiseEvent(dEvents.GridMouseLeftDoubleClick, evt, col=col, row=row)
  File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\dPemMixin.py"
, line 924, in raiseEvent
    super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args, **kwargs)
  File "C:\Python25\lib\site-packages\dabo-full\trunk\dabo\lib\eventMixin.py", l
ine 92, in raiseEvent
    bindingFunction(event)
  File "c:\docume~1\nwlowri\locals~1\temp\tmpoua2zm.py", line 554, in onGridMous
eLeftDoubleClick
    self.Form._showPartEditAndEntryDialog()
  File "c:\docume~1\nwlowri\locals~1\temp\tmpoua2zm.py", line 420, in _showPartE
ditAndEntryDialog
    dlg = self._partEntryAndEditDialogClass(self.getBizobj("Parts"), self.getBiz
obj("PartMetadata"), self)
  File "c:\docume~1\nwlowri\locals~1\temp\tmpcbi5jt.py", line 367, in __init__
    super(self.__class__, self).__init__(*args, **kwargs)
  File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\dDialog.py",
line 518, in __init__
    super(dOkCancelDialog, self).__init__(parent, properties, *args, **kwargs)
  File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\dDialog.py",
line 230, in __init__
    super(dStandardButtonDialog, self).__init__(parent=parent, properties=proper
ties, *args, **kwargs)
  File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\dDialog.py",
line 42, in __init__
    self._addControls()
  File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\dDialog.py",
line 321, in _addControls
    super(dStandardButtonDialog, self)._addControls()
  File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\dDialog.py",
line 111, in _addControls
    self.addControls()
  File "c:\docume~1\nwlowri\locals~1\temp\tmpcbi5jt.py", line 74, in addControls

    obj = dabo.ui.dTextBox(currParent, attProperties={'NameBase': u'skuEntry', u
'FontFace': u'Arial', u'DataSource': u'self.Parent.partBizobj', u'DataField': u
'SKU'})
  File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\dTextBox.py",
 line 19, in __init__
    *args, **kwargs)
  File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\dTextBoxMixin
.py", line 413, in __init__
    dTextBoxMixinBase.__init__(self, preClass, parent, properties, attProperties
, *args, **kwargs)
  File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\dTextBoxMixin
.py", line 42, in __init__
    dcm.dDataControlMixin.__init__(self, preClass, parent, properties, attProper
ties, *args, **kwargs)
  File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\dDataControlMixinB
ase.py", line 22, in __init__
    dabo.ui.dControlMixin.__init__(self, *args, **kwargs)
  File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\dPemMixin.py"
, line 120, in __init__
    attVal = eval(val)
  File "<string>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'partBizobj'

I did some checking and the parent is being passed correctly.
However, it is being put into _preInitProperties dictionary and isn't
being set until after we evaluate the attProps from the ClassDesigner.
 Therefore, we are returning None for the parent and getting this
error.  How do you want to fix this?

Nate L.


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to