On Tue, Mar 11, 2008 at 9:31 AM, Ed Leafe <[EMAIL PROTECTED]> wrote: > On Mar 11, 2008, at 11:24 AM, Nate Lowrie wrote: > > > To check, I did the following modifications: > > > > def _getNonUpdateFields(self): > > return self._CurrentCursor.getNonUpdateFields() > > > > def _setNonUpdateFields(self, fldList=None): > > print fldList > > if fldList is None: > > fldList = [] > > self._nonUpdateFields = fldList > > print self._nonUpdateFields > > Add this line: print "CURSORS:", len(self.__cursors) > > I'll bet it's zero.
Yup, it is 0. That was my bet too... > > > > self._syncWithCursors() > > print self._CurrentCursor.getNonUpdateFields() > > > > Result is: > > > > ["someField", "anotherField"] > > ["someField", "anotherField"] > > [] > > > > So, this tells me that _syncWithCursors is not setting the > > NonUpdateFields on current cursor properly. > > Or that there is no _CurrentCursor. > > > > This behavior occurs when > > NonUpdateFields is passed in the constructor, set in initProperties, > > or set in afterInit. If I set it after the afterInit function has > > run, it is fine. > > > > Does this clear things up? Thoughts? > > > Referencing self._CurrentCursor will create a new, empty cursor > object if there are no existing cursors. I think that that's what's > happening here. Perhaps we need to do a sync as soon as the cursor is > created. That would make the most sense. I would have done the commit myself, but am not too familiar with the bizobj working code. I thought about checking len(self.__cursors) and adding a cursor if there is none before calling self._syncWithCursor, but thought that there should be a better way. Nate L. _______________________________________________ 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/dabo-dev/[EMAIL PROTECTED]
