Re: [dabo-users] Grid from SQLite Views

Author: John Fabiani

Posted: 2012-03-02 at 12:00:46

On Friday, March 02, 2012 07:33:00 PM Dewald Jacobs wrote:

> Hi,

>

> I tried that and I can now successfully choose a View from "Add controls

> from Data Environment" in class designer. The column names also show up in

> the grid. The app runs, but I get the following traceback:

>

> Traceback (most recent call last):

> File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line

> 1466 9, in <lambda>

> lambda event: event.callable(*event.args, **event.kw) )

> File "C:\projects\dabo\ui\uiwx\dGrid.py", line 2250, in _restoreSort

> self.processSort(sortCol, toggleSort=False)

> File "C:\projects\dabo\ui\uiwx\dGrid.py", line 2894, in processSort

> biz.sort(columnToSort, sortOrder, self.caseSensitiveSorting)

> File "C:\projects\dabo\biz\dBizobj.py", line 1209, in sort

> cc.sort(col, ordr, caseSensitive)

> File "C:\projects\dabo\db\dCursorMixin.py", line 560, in sort

> _("Invalid column specified for sort: ") + col)

> dabo.dException.dException: Invalid column specified for sort: Gebeurtenis

>

> Gebeurtenis is a column in the grid/view. When I then proceed to click on

> the tab in which the grid in question is situated I get an endless loop

> with the following traceback:

>

> Traceback (most recent call last):

> File "C:\projects\dabo\ui\uiwx\dGrid.py", line 331, in GetValue

> ret = self.getStringValue(bizobj.getFieldVal(field, row))

> File "C:\projects\dabo\biz\dBizobj.py", line 1872, in getFieldVal

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

> _rowChangeCallback=changeRow NumCallback)

> File "C:\projects\dabo\db\dCursorMixin.py", line 940, in getFieldVal

> _("Field"), fld, _("does not exist in the data set")))

> dabo.dException.FieldNotFoundException: Field 'Julian' does not exist in the

> dat a set

>

> Julian is a column in the grid/view. This traceback repeats and cycles all

> the column names from the View. How should I proceed? Is there any other

> info you need from me?

>

> Thanks again.

> Dewald

>

Hmmmmmmm! I don't know enough about SQLite to really be a help. I don't know

if the issue lies with the view or the column data type (never really

understood SQLites lack of data types).

Here's how I'd move forward:

I would try and determine if the issue lies with view or the column by

creating a real table with the same fields and try using it with

ClassDesigner. If works then it has something to do with the view. If not

then it has someting to do with the data type and how the code is trying to

sort.

There have been recent changes to the ClassDesigner and maybe those changes

are causing new issues. Maybe someone with a little experience with SQLite

will jump in and provide a little insight.

Johnf

_______________________________________________

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/8019684.MRniqbd0Py@linux-12

©2012 John Fabiani