On 05/05/2016 11:19 AM, john wrote:
On 05/05/2016 07:45 AM, Sibylle Koczian wrote:
At the moment it's only one problem: dForm.next() doesn't work with Dabo 2. Example given below.

Of course it doesn't - it's the only one that is called differently "next(self)' instead of self.next(). And the routines are recursive. I'll check into the problem and see what I can find. I don't normally use next() for anything (actually I don't use any of the move methods) in my programs.

Thanks for the code. BTW I normally pass the Datasource and that might a source of the issue - just guessing!

Johnf

OK I haven't been able to fix the next(). This is not the first time I've had this trouble (had it even with the old Dabo). If I had to guess I would say that neither Sqlite or Postgres dbapi modules (sqlite3, psycopg) have a "__iter__" method. Ed and Paul worked mostly with MySQLdb which does have the "__iter__". They may have thought all database modules had it. But I don't really know. Anyway, that's why I think we get the "StopIteration:" exception. Of course this is just a guess and I could be completely wrong!

In the past I have always just made my own next() by:
Create my own next method and then do
get the cursor
get the current pk
add one to the pk
movetoPK(pk)

This works for me because all my PK's are integers. It would not work for other types of PK's.

I've written dabo-dev asking how next() is suppose work. Let's hope that they have an answer and maybe a fix.

Johnf




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.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