Re: [dabo-users] Precision Value in Grid Column

Author: John Fabiani

Posted: 2012-05-15 at 13:46:05

On Tuesday, May 15, 2012 01:21:43 PM Ed Leafe wrote:

> On May 15, 2012, at 1:18 PM, Ed Leafe wrote:

> >> File "/home/johnf/dabo/dabo/ui/uiwx/dGrid.py", line 1384, in

> >> _setPrecision>>

> >> dabo.ui.callAfterInterval(50, self.Parent.refresh)

> >>

> >> AttributeError: 'NoneType' object has no attribute 'refresh'

> >>

> > Are you creating columns independently, and then later adding them to

> > the grid? That's what this error seems to imply: a column with no

> > Parent.

> Try the fix I just posted.

>

>

> -- Ed Leafe

Paul's code with Precision added appears to work. However, my old code is

presenting new errors.

Traceback (most recent call last):

File "/home/johnf/dabo/dabo/ui/uiwx/dPemMixin.py", line 595, in

__onWxKeyChar

self.raiseEvent(dEvents.KeyChar, evt)

File "/home/johnf/dabo/dabo/ui/uiwx/dPemMixin.py", line 1074, in raiseEvent

super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args,

**kwargs)

File "/home/johnf/dabo/dabo/lib/eventMixin.py", line 81, in raiseEvent

bindingFunction(event)

File "esStudent.py", line 3840, in _lookup

thestr= self.Form.lookup(evt)

File "esStudent.py", line 4251, in lookup

evtValue,'pkid',LUFilter=specialSQL)

File "/home/johnf/pespy/lookup.py", line 156, in lookup

CallingForm.requery()

File "/home/johnf/dabo/dabo/ui/uiwx/dForm.py", line 533, in requery

response = bizobj.requery()

File "/home/johnf/dabo/dabo/biz/dBizobj.py", line 1202, in requery

self.requeryAllChildren()

File "/home/johnf/dabo/dabo/biz/dBizobj.py", line 1880, in

requeryAllChildren

self._resetChildrenParent(_doRequery)

File "/home/johnf/dabo/dabo/biz/dBizobj.py", line 1523, in

_resetChildrenParent

child.setCurrentParent()

File "/home/johnf/dabo/dabo/biz/dBizobj.py", line 1786, in setCurrentParent

val = self.getParentLinkValue()

File "/home/johnf/dabo/dabo/biz/dBizobj.py", line 1268, in

getParentLinkValue

ret = map(self.Parent.getFieldVal, tuple(flds))

File "/home/johnf/dabo/dabo/biz/dBizobj.py", line 1951, in getFieldVal

ret = self._CurrentCursor.getFieldVal(fld, row,

_rowChangeCallback=changeRowNumCallback)

File "/home/johnf/dabo/dabo/db/dCursorMixin.py", line 901, in getFieldVal

self._correctFieldTypesIfNeeded(rec)

File "/home/johnf/dabo/dabo/db/dCursorMixin.py", line 220, in

_correctFieldTypesIfNeeded

rec[fld_name] = _correctFieldType(rec[fld_name], fld_name)

File "/home/johnf/dabo/dabo/db/dCursorMixin.py", line 237, in

_correctFieldType

if isinstance(field_val, pythonType):

TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and

types

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/4499551.6TKjEoNOmk@linux-12

©2012 John Fabiani