> How is it best to store a RB dictionary so its available on > subsequent runs of an app? I suppose I can just write a text > file with the values common delimitted, but is there a slicker way?
Try XMLDictionary: http://www.tildesoft.com/Files/XMLDictionary.rb > Also, how would one have a dictionary that does one to many > - like Employee Number, Last Name, First Name, ShiftCode, > overtime rate? Would you need to do four parallel > dictionaries to look up each thing by employee number? Create an employee class with properties for Employee Number, Last Name, First Name, ShiftCode, overtime rate, etc., and store them in a dictionary using Employee Numbers for keys. Alternatively, rather than creating an object for each employee, you can create a dictionary for each Employee, so you have a 2-level dictionary (the Employees dictionary, where each item, stored with the Employee Number as key, is another dictionary containing entries for Last Name, First Name, ShiftCode, overtime rate, etc.) -- that way you can read and write the entire 2-level dictionary to disk using XMLDictionary. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
