Ed Leafe <[EMAIL PROTECTED]> writes:

>
> 
>       I'm stumped. I just used the Class Designer to create a form, and  
> create a grid on it using the Data Environment wizard as you did. I  
> used a connection file to an SQLite database that I use for tracking  
> suspicious IP addresses that hit my server. I changed the DataField  
> for a column to an alias that didn't exist in the table, and then  
> changed the generated bizobj code to delete the SQL Builder stuff,  
> and define the UserSQL to include the aliased field. Here's the  
> bizobj code:
> 

>       The grid column that was originally created with a DataField of  
> 'ipaddress' was changed so that it now had DataField = "crappo". I  
> ran the design, and everything appeared as expected. From the running  
> design, I pressed Cmd-D to bring up a command window, and typed  
> 'print self.PrimaryBizobj.getDataSet()', and the output showed a  
> series of rows, each of which had a key named 'crappo'.
> 
>       Is it possible that SQLite is changing the case of the alias name?  
> Try this: right after your self.requery(), add the line:
> 
> print self.PrimaryBizobj.getDataSet()[0].keys()
> 
> ...in order to see what the fields in your data set are actually named.
> 


the output with print self.PrimaryBizobj.getDataSet()[0].keys() is:


['Date0', 'StorageBox0', 'Type0_fk', 'location0', 'InfSource0', 'Descript0',
'Name0', 
'RecSource0', 'RecID', 'HideOnline']
Dabo Info Log: Sat Sep 01 12:56:48 2007: Application finished.

Traceback (most recent call last):
  File "C:\projects\dabo\dabo\ui\uiwx\dGrid.py", line 297, in IsEmptyCell
    return not bizobj.getFieldVal(field, row)
  File "C:\projects\dabo\dabo\biz\dBizobj.py", line 1285, in getFieldVal
    return cursor.getFieldVal(fld, row)
  File "C:\projects\dabo\dabo\db\dCursorMixin.py", line 781, in getFieldVal
    raise dException.FieldNotFoundException, "%s '%s' %s" % (
dabo.dException.FieldNotFoundException: Field 'phType' does not exist in the
data set

However, my grid is filled with a dataset that is a child of the PrimaryBizobj,
so the  field alias and other grid fields are not listed with
print self.PrimaryBizobj.getDataSet()[0].keys() 

                                   dwarder




_______________________________________________
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/dabo-users/[EMAIL PROTECTED]

Reply via email to