Thank you I will give that a try and report back.
On 14 May 2012 14:56, Ed Leafe <[email protected]> wrote: > On May 14, 2012, at 2:31 AM, Allan Brooke wrote: > > > I have been searching in code for how dabo saves various settings I > believe > > to a SQLite database eg screen coordinates in the ClassDesigner. > > > > Could anyone please point me to the code used for this purpose? > > > > I am basically interested in saving dict values to a table in SQLite and > > being able to update same when changed. > > You could simply piggy-back on the Dabo PreferenceManager built > into all Dabo classes. The general pattern is: > > (setting) > pm = self.PreferenceManager > pm.lunch.entrees = ["steak", "salmon", "tofu"] > > (getting) > pm = self.PreferenceManager > for entree in pm.lunch.entrees: > print "You may eat %s" % entree > > All the saving happens pretty automagically. Just use standard > dotted-object notation to set attributes of the ProjectManager, nesting > them as much as needed. Later you can retrieve those values by just > referencing the same path. Every object can have its own BasePrefKey value, > which is the root of the path, so that you can keep your saved values > separate. > > > -- Ed Leafe > > > > _______________________________________________ > 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/[email protected] > --- 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/CANjKA-=96FZES+NagCp6cKedkp=0gdcnogzffqrjvrrhh_7...@mail.gmail.com
