Ed Leafe wrote:
> dabo Commit
> Revision 4992
> Date: 2009-01-29 20:50:59 -0800 (Thu, 29 Jan 2009)
> Author: Ed
> Trac: http://trac.dabodev.com/changeset/4992
> 
> Changed:
> U   trunk/dabo/db/dCursorMixin.py
> 
> Log:
> Changed the code in new() to create a dDataSet instead of a tuple.
> 
> 
> Diff:
> Modified: trunk/dabo/db/dCursorMixin.py
> ===================================================================
> --- trunk/dabo/db/dCursorMixin.py     2009-01-30 02:52:03 UTC (rev 4991)
> +++ trunk/dabo/db/dCursorMixin.py     2009-01-30 04:50:59 UTC (rev 4992)
> @@ -344,7 +344,7 @@
>               try:
>                       _records = self.fetchall()
>               except Exception, e:
> -                     _records = tuple()
> +                     _records = dabo.db.dDataSet()

This wasn't necessary, since it gets converted to a dDataSet later on...


>                       # Database errors need to be decoded from database 
> encoding.
>                       try:
>                               errMsg = str(e).decode(self.Encoding)
> @@ -1501,7 +1501,7 @@
>       def new(self):
>               """Add a new record to the data set."""
>               blank = self._getBlankRecord()
> -             self._records += dDataSet((blank,))
> +             self._records = dDataSet(self._records + (blank,))
>               # Adjust the RowCount and position
>               self.RowNumber = self.RowCount - 1

This seems to have fixed the problem I reported. Thanks!

Paul


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to