Christoph Zwerschke wrote: > In come back to the problem addressed in dabo-users that in order to > make the step-by-step guide work, you need to explicitly set > self.NonUpdateFields = ["clientname"], although dabo should be able to > recognize that clientname is not a field of that table automatically. > > I have just analyzed this a bit. The problem is that the default > NonUpdateFields are determined in dCursorMixin like this: > > self.__nonUpdateFields = [f[0] for f in self.DataStructure > if (f[3] != self.Table) or not f[4]] > > But in _getDataStructure f[3] is always set as self.Table, even for > fields which do not belong to the table; there is this comment: > # Get the information from the backend. Note that elements 3 and 4 get > # guessed-at values. > > So I think the root cause is that these fields are only guessed at and > not determined exactly. I think dabo should at least check whether the > field exists in self.Table and set f[3] and f[4] to None otherwise. > > The fields of the table could be requested in _getDataStructure as > self.BackendObject.getFields(self.Table, self). > > Does this make sense? I don't yet understand the inner workings of dabo > well enough to propose a proper fix.
Thanks for analyzing it though. Ed or I can take it from here. I've been wondering why I haven't been seeing the problem where NonUpdateFields weren't recognized, and it turns out it is because I *explicitly* define my DataStructure. 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]
