Sorry it has taken me so long to reply to your suggestions.

On Fri, Aug 22, 2008 at 3:51 PM, Paul McNett <[EMAIL PROTECTED]> wrote:
>
>
>
> As I suspected, that Value attribute entry in the cdxml is getting
> evaluated as an int instead of a str. You tried removing the Value
> attribute from the cdxml?
>

Yes, and I'm not sure if it was because of the way I changed it or what, but
now I'm getting a whole new error.  I've tried everything I can think of to
fix it, including making sure that the credentials in the cnxml file are
correct, testing the connection with CxnEditor, and printing self.AutoSQL
and executing the generated SQL statements in the database.  Everything
seems to be fine as far as I can tell, but maybe you can make sense of the
traceback:

Traceback (most recent call last):
  File "main.py", line 13, in <module>
    app.start()
  File "C:\src\dabo\dApp.py", line 315, in start
    self.setup()
  File "C:\src\dabo\dApp.py", line 280, in setup
    self.initUIApp()
  File "C:\src\dabo\dApp.py", line 307, in initUIApp
    self.uiApp.setup()
  File "C:\src\dabo\ui\uiwx\uiApp.py", line 302, in setup
    frm = self.dApp.MainForm = dabo.ui.createForm(mfc)
  File "C:\src\dabo\ui\uiwx\__init__.py", line 1121, in createForm
    frm = cls(*args, **kwargs)
  File "c:\docume~1\mike\locals~1\temp\tmpahmzdo.py", line 64, in __init__
    obj = self.getCustControlClass('dRadioList_9826983053')(currParent)
  File "c:\docume~1\mike\locals~1\temp\tmpahmzdo.py", line 229, in __init__
    dabo.ui.dRadioList.__init__(self, parent=parent,
attProperties=attProperties, *args, **kwargs)
  File "C:\src\dabo\ui\uiwx\dRadioList.py", line 145, in __init__
    cim.dControlItemMixin.__init__(self, preClass, parent, properties,
attProperties, *args, **kwargs)
  File "C:\src\dabo\ui\uiwx\dControlItemMixin.py", line 20, in __init__
    super(dControlItemMixin, self).__init__(*args, **kwargs)
  File "C:\src\dabo\ui\dDataControlMixinBase.py", line 22, in __init__
    dabo.ui.dControlMixin.__init__(self, *args, **kwargs)
  File "C:\src\dabo\ui\uiwx\dPemMixin.py", line 185, in __init__
    self._afterInit()
  File "C:\src\dabo\ui\uiwx\dPemMixin.py", line 319, in _afterInit
    self.afterInit()
  File "c:\docume~1\mike\locals~1\temp\tmpahmzdo.py", line 236, in afterInit
    print biz.getFieldVal('level')
  File "C:\src\dabo\biz\dBizobj.py", line 1313, in getFieldVal
    ret = cursor.getFieldVal(fld, row,
_rowChangeCallback=changeRowNumCallback)
  File "C:\src\dabo\db\dCursorMixin.py", line 805, in getFieldVal
    raise dException.NoRecordsException, _("No records in the data set.")
dabo.dException.NoRecordsException: No records in the data set.



> > I tried adding the
> > code that Uwe suggested:
> >
> > self.DefaultValues['rlist'] = 1
> >
> > in my bizobj code, but it gives me the error 'Compilation Error:No
> records
> > in the data set.' which is weird since I know there are records in the
> > table.
>
>
> I've never seen that error before, so I did a search. It appears that
> this error comes from the ClassDesigner, in the onRunDesign() method.
>
> Are you editing your bizobj using the Class Designer? Are you putting
> the DefaultValues setting in the bizobj's initProperties() method?
>
> Does that error occur as soon as you make the setting or only when you
> try to run your design? If the latter, don't run your design from within
> the Class Designer but do it from the command line by running your app.
>

Actually I was getting that error both when I was running it in
ClassDesigner and from the command line.  I would verify that, but the error
I mentioned above prevents it.


> I'm not sure if the above is the best advice. Perhaps Ed will chime in
> with better help.
>
> >> Test to see by asking the bizobj:
> >>   print biz.getFieldVal(fieldname)
> >>
> >
> > I'm not sure what you mean by this.  Where should I put that?
>
> Anywhere that you have a reference to your bizobj. Perhaps in your
> form's afterInitAll():
>
> def afterInitAll():
>   biz = self.PrimaryBizobj
>   print biz.getFieldVal(fieldname)
>   print biz.DefaultValues
>
> Paul
>

Well, if you have any other suggestions, I'd really appreciate it.  Thanks
for your help thus far.

Mike M.


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
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/[EMAIL PROTECTED]

Reply via email to