home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / OOFILE / docs / gotchas.txt < prev    next >
Encoding:
Text File  |  1995-06-01  |  802 b   |  21 lines  |  [TEXT/ttxt]

  1. GOTCHAS.TXT
  2. This document records a few common mistakes made by people using OOFILE. Over time, we will try to minimize them with OOF_Debug tests:
  3.  
  4. FAILURE TO CLOSE A TABLE DECLARATION
  5.  
  6. The macro CLASS_TABLE is used to start the class declaration for a dbTable class. However, you should still have the 
  7. };
  8. at the end of the declaration, just like any other class.
  9.  
  10.  
  11.  
  12. USING SINGLE = IN SEARCHES
  13. This is the classic mistake - instead of searching for People with a Salary of 50000, we are actually assigning to the current record.
  14.  
  15.     People[People.Salary=50000];
  16.     cout << People << endl << endl;
  17.  
  18. If you have OOF_Debug defined, the default setting of requiring an explicit save will catch this error, and give you a message like:
  19.  
  20. "ContextChange called on dirty record without saving: file name: People"
  21.