Both issues have a common cause, and the hints provided by both Ed and Paul 
helped me make progress. I would appreciate more help in figuring out a 
workaround.

To review, my application has a list of database records on the left, and a 
detailed view of the selected database record on the right.

On a row selection, dEvents.RowNumChanged was firing and the detailed record 
view was getting refreshed. Unfortunately, the refresh was getting killed by 
an exception on the first field, the primary key named 'id'. For some reason 
the initial generation of the form by the ClassDesigner put this as the data 
field:
<dTextBox sizerInfo="{'Proportion': 0, 'ColExpand': 
True, 'VAlign': 'Middle', 'Expand': True,         'RowExpand': False}" 
rowColPos="(0, 1)" designerClass="controlMix" DataField="&#060;built-in 
function id&#062;" DataSource="tablename"></dTextBox>

It appears that this GridSizer can't see the id field of my SQLite database. 
It has problems with 'id', 'ID', 'rowid', and 'ROWID' in any of the controls 
in the sizer. The GridList on the left of the application displays the 
contents of the id field just fine. I can also see the id field when 
accessing my db through the command line.

Three behaviors deserve more description:
1. No matter how I quote 'id' or "id" the interpreter sees it as the built-in 
python function:

dabo.dException.FieldNotFoundException: Field '<built-in function id>' does 
not exist in the data set

2. The ClassDesigner sometimes, but not always, stores the XML encoded 
<built-in function id> as the DataField when I give it 'id'. It hasn't 
mangled any of the aliases 'ID', 'rowid', etc, I have seen this happen at 
least twice.

3. The other aliases for the id field are still not seen by the interpreter:
dabo.dException.FieldNotFoundException: Field 'ID' does not exist in the data 
set

I have tried various combinations of quoting, capitalization, and prepending 
the table name. They all result in FieldNotFoundExceptions.

I have also been getting KeyErrors on the 'id' field, so perhaps my bizObj 
can't see that field either.

My form is laid out as follows:
dForm->Sizer: Vertical->dPanel->Sizer: Horizontal
1) GridListRecords (dGrid), Column (id), Column (field1), etc.
2) Grid Sizer -> dTextBox/dLabel id, dTextBox/dLabel field1, etc

I just recreated the table with 'id' to named 'testid', and everything works. 
I renamed it back to 'id' and I get the same errors. Did I just find a bug in 
the framework?

How should I proceed?

Thank you for all of your help up to this point.

Richard

On Wednesday 01 October 2008 15:12:23 Ed Leafe <[EMAIL PROTECTED]> wrote:
> On Oct 1, 2008, at 3:58 PM, Richard Esplin wrote:
> > I took Ed's advice and tried simply adding self.Form.update() to
> > onGridCellSelected, but the detailed view on the right is still
> > blank. I have
> > played around a bit, and don't see any different behavior. My print is
> > getting run, so I know control is getting passed to onGridCellSelected
> > correctly.
>
>       There is an event for this: dEvents.RowNumChanged. This is raised
> whenever the row number changes in a data-bound grid, so the update
> should already by firing. I would check the data binding properties of
> the controls.
>
>       Can you post the DataSource and DataField of a couple of the controls
> that are apparently not responding? Are they placed directly on the
> form, on a panel, or several layers deep in a paged control?
>
> -- Ed Leafe


_______________________________________________
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