Back on Dec 31 I submitted a request for help with a problem of adding a new record to a form with a parent-child child relationship. You requested a traceback which I sent. I haven't seen a response but I know Ed's life has been disrupted so it may have gotten lost in the shuffle. I've included the correspondence below in hopes you might be able to shed some light on it.
Thanks, Steve Rose On 1/1/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Send Dabo-users mailing list submissions to > [email protected] > > > > Today's Topics: > > 1. Re: Dabo-users Digest, Vol 42, Issue 60 (Steve Rose) > 2. Re: how to install (Carl Karsten) > 3. Dabo-users List Statistics for December, 2007 > (List Administrator Account) > 4. Dabo-users List Statistics for 2007 (List Administrator Account) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 31 Dec 2007 19:57:08 -0800 > From: "Steve Rose" <[EMAIL PROTECTED]> > Subject: Re: [dabo-users] Dabo-users Digest, Vol 42, Issue 60 > To: [email protected] > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1 > > Here is the requested traceback, thanks. > > > C:\aaa\DaboCode\ParentChild>python ParentChild_Hand.py > Dabo Info Log: Mon Dec 31 19:54:20 2007: 1 database connection > definition(s) > loa > ded. > Dabo Info Log: Mon Dec 31 19:54:20 2007: User interface already set to > 'wx', > so > dApp didn't touch it. > Dabo Info Log: Mon Dec 31 19:54:20 2007: wxPython Version: 2.8.7.1 wxMSW > (unicod > e) > Traceback (most recent call last): > File "c:\python25\lib\site-packages\Dabo- > 0.8.3-py2.5.egg\dabo\ui\uiwx\dControl > Mixin.py", line 21, in _onWxHit > self.raiseEvent(dEvents.Hit, evt, *args, **kwargs) > File "C:\Python25\lib\site-packages\dabo- > 0.8.3-py2.5.egg\dabo\ui\uiwx\dPemMixi > n.py", line 882, in raiseEvent > super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args, > **kwargs) > File "C:\Python25\lib\site-packages\dabo- > 0.8.3-py2.5.egg\dabo\lib\eventMixin.p > y", line 93, in raiseEvent > bindingFunction(event) > File "ParentChild_Hand.py", line 104, in onHitNew > self.Form.new() > File "C:\Python25\lib\site-packages\dabo- > 0.8.3-py2.5.egg\dabo\ui\uiwx\dForm.py > ", line 602, in new > self.raiseEvent(dEvents.RowNumChanged) > File "C:\Python25\lib\site-packages\dabo- > 0.8.3-py2.5.egg\dabo\ui\uiwx\dPemMixi > n.py", line 882, in raiseEvent > super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args, > **kwargs) > File "C:\Python25\lib\site-packages\dabo- > 0.8.3-py2.5.egg\dabo\lib\eventMixin.p > y", line 93, in raiseEvent > bindingFunction(event) > File "C:\Python25\lib\site-packages\dabo- > 0.8.3-py2.5.egg\dabo\ui\uiwx\dGrid.py > ", line 3017, in __onRowNumChanged > self.refresh() > File "C:\Python25\lib\site-packages\dabo- > 0.8.3-py2.5.egg\dabo\ui\uiwx\dGrid.py > ", line 2918, in refresh > self._syncCurrentRow() > File "C:\Python25\lib\site-packages\dabo- > 0.8.3-py2.5.egg\dabo\ui\uiwx\dGrid.py > ", line 2941, in _syncCurrentRow > self.CurrentRow = self.getBizobj().RowNumber > File "C:\Python25\lib\site-packages\dabo- > 0.8.3-py2.5.egg\dabo\ui\uiwx\dGrid.py > ", line 3817, in _setCurrentRow > self.SetGridCursor(val, cn) > File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\grid.py", line > 1355, > in SetGridCursor > return _grid.Grid_SetGridCursor(*args, **kwargs) > wx._core.PyAssertionError: C++ assertion "uiIndex < m_nCount" failed at > ..\..\in > clude\wx/dynarray.h(813) in wxBaseArrayInt::Item() > > > Steve Rose > > > > > On 12/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > wrote: > > > > Send Dabo-users mailing list submissions to > > [email protected] > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://leafe.com/mailman/listinfo/dabo-users > > or, via email, send a message with subject or body 'help' to > > [EMAIL PROTECTED] > > > > You can reach the person managing the list at > > [EMAIL PROTECTED] > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of Dabo-users digest..." > > > > > > Today's Topics: > > > > 1. Parent-Child link lost on Proself.Form.new() (Steve Rose) > > 2. Re: Parent-Child link lost on Proself.Form.new() (Ed Leafe) > > 3. Re: how to install (Carl Karsten) > > 4. Re: how to install (Ed Leafe) > > 5. Re: how to install (Carl Karsten) > > 6. Re: how to install (Nate Lowrie) > > 7. "MySQL server has gone away" (Dave Stredulinsky) > > 8. "MySQL server has gone away" (Dave Stredulinsky) > > 9. Re: [part 2] a Simple tutorial on bizObjects` (bsnipes) > > 10. Re: "MySQL server has gone away" (Dennis Lee Bieber) > > 11. Re: [part 2] a Simple tutorial on bizObjects` (Ed Leafe) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Mon, 31 Dec 2007 09:18:51 -0800 > > From: "Steve Rose" <[EMAIL PROTECTED]> > > Subject: [dabo-users] Parent-Child link lost on Proself.Form.new() > > To: [email protected] > > Message-ID: > > <[EMAIL PROTECTED]> > > Content-Type: text/plain; charset=ISO-8859-1 > > > > I have set up a simple form with a parent child relationship. It has the > > usual thing with textfields linking to parent data and a grid linking to > > the > > child records. The test database is just a parent table with 3 records > > (firstname, lastname, pkid) and child (firstname, lastname, pkid, > > childNo). > > The parentBizobj's key field is pkid. The chidNo field is indexed as a > > foreign key to the parent pkid. The childBizobj has its keyfield set to > > pkid > > and self.LinkField = "ChildNo". > > Four buttons handle first, prior, next and last navigation in the > parent. > > This works perfectly as the grid always updates correctly when > navigation > > occurs in the parent table. Three other buttons are supposed to handle > > new, > > save and cancel functions. When I click New (code: self.Form.new() or > > self.Form.new('parent'), I lose the link to the grid. I can still > navigate > > the parent, but the link to the child records are lost. The traceback is > > lengthy and not too helpful, but the gist of it seems to be that the > grid > > loses its current row number and I see such things as "uiIndex < > m_nCount > > failed in wxBaseArray" blah, blah. Obviously the grid has lost its link > to > > the parent. > > > > Without bogging you down with all the details, is there usually a common > > error beginners make when having problems adding a record to a parent > > table > > linked to a child? I must be doing something right if I can navigate OK > > but > > somehow I am missing something basic about adding a record to a parent. > > > > BTW, new() works fine in a simple form with only one table. > > > > Steve Rose > > > > > > --- StripMime Report -- processed MIME parts --- > > multipart/alternative > > text/plain (text body -- kept) > > text/html > > --- > > > > > > > > ------------------------------ > > > > Message: 2 > > Date: Mon, 31 Dec 2007 12:34:20 -0500 > > From: Ed Leafe <[EMAIL PROTECTED]> > > Subject: Re: [dabo-users] Parent-Child link lost on Proself.Form.new() > > To: Dabo Users list <[email protected]> > > Message-ID: <[EMAIL PROTECTED]> > > Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed > > > > On Dec 31, 2007, at 12:18 PM, Steve Rose wrote: > > > > > Four buttons handle first, prior, next and last navigation in the > > > parent. > > > This works perfectly as the grid always updates correctly when > > > navigation > > > occurs in the parent table. Three other buttons are supposed to > > > handle new, > > > save and cancel functions. When I click New (code: self.Form.new() or > > > self.Form.new('parent'), I lose the link to the grid. I can still > > > navigate > > > the parent, but the link to the child records are lost. The > > > traceback is > > > lengthy and not too helpful, but the gist of it seems to be that > > > the grid > > > loses its current row number and I see such things as "uiIndex < > > > m_nCount > > > failed in wxBaseArray" blah, blah. Obviously the grid has lost its > > > link to > > > the parent. > > > > It's not that the link is "lost"; it's that whatever error > caused > > the traceback is preventing the update from proceeding. Please paste > > the full traceback, as it is probably more helpful than you think. ;-) > > > > -- Ed Leafe > > -- http://leafe.com > > -- http://dabodev.com > > > > > > > > > > > > > > End of Dabo-users Digest, Vol 43, Issue 1 > ***************************************** > --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ 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]
