On 5/5/16 5:11 PM, john wrote:
Hi Paul and Ed,
Something I have never understood is the why and how the next() works in
Dabo.
First, why didn't you change the name to something that did not conflict
with the Iteration next() (something like nnext()). Every time I have
trouble with using next with my cursors I run into:
StopIteration:
Dabo was written before (right before) generators were formalized in
python.
We should rewrite dabo's dCursor and dBizobj to be native iterators, and
get rid of the next(), prior(), etc. but barring that renaming next()
seems necessary. Unfortunately, this will likely break user code.
This is not a Traceback but an exception for some iteration somewhere -
who knows where. But I can't trace it because I can't determine where
it's coming from - there is no Try:/Except anywhere associated with
cursor.next(). I have been lucky that I always used some work around.
Python raises StopIteration when there are no more items to iterate (and
catches it to stop the iteration so normally you don't see it). If it's
being raised, though, you should be able to see the traceback to find
out from where.
If you are seeing only 'StopIteration:' is that in the terminal or in
the ui? If in the UI, you could set
`dabo.settings.eatBizExceptions=False` to hopefully see the traceback in
the terminal.
The current problem is the dabo2 branch is not working with
cursor.next(). When the code get to
next(self._CurrentCursor)
If there's no traceback what's your evidence this is happening from
dCursorMixin.next()?
I get the exception "StopIteration:" and I can't go forward with any
debugging (at least nothing I know about).
So will one of you please explain how it's suppose to work? Or maybe
you know what's wrong. I'll take a fix any day.
I think we'll need to rename it, unfortunately.
Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]