home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / OOFILE / docs / pplant.txt < prev    next >
Encoding:
Text File  |  1995-09-04  |  2.8 KB  |  65 lines  |  [TEXT/ttxt]

  1. PPlant.txt
  2. This document describes the PowerPlant interface for OOFILE.
  3.  
  4. The PowerPlant application structure follows the generic structure described in gui.txt.
  5.  
  6. The main aim is to reduce the amount of standard user code required to manage the database. eg: if we have Add and Edit dialogs, they should be registered with a document, then you don't have to write the code to launch the appropriate dialog when the Add button is pressed.
  7.  
  8.  
  9. TRANSLATING USE CASES INTO POWERPLANT OBJECTS & BEHAVIOUR
  10. 3) Adding a record
  11. 3.1 The user presses a button or chooses a menu item.
  12. Choosing a menu item fires off the command dbAdd. The ObeyCommand for both the List and possibly an enclosing Document pass the command through mDocHelper->ObeyCommand. This would internally call addRecord().
  13.  
  14. Pressing a button sends a message to the Listener for that button. The ListenToMessage case for the Add button calls mDocHelper->addRecord(); 
  15.  
  16.  
  17. 3.2 A form appears on which they enter data and 
  18. The doc helper has had the edit dialog registered, but HOW do we call it????? 
  19.  
  20.  
  21.  
  22.  
  23. 3.3 accept by pressing an OK button. 
  24.  
  25. 3.4 The record is saved and, 
  26.  
  27. 3.5 they return to the original context 
  28.  
  29.  
  30.  
  31. GUI INTEGRATION CLASSES
  32. dbTableMgr
  33. Manages an embedded table, can attach buttons such as Add, Delete
  34.  
  35. dbFieldLink
  36. Links an LControl, LEditField or LTextEdit to a database field.
  37. Not used explicitly but manufactured by dbEditMgr::makeLink(LControl, dbField) or some overloaded variant.
  38.  
  39. dbEditHelper
  40. Mixin for an edit dialog
  41. Owns and manages a list of dbFieldLinks.
  42. Also handles standard commands like dbFirst, dbPrev etc.
  43. Provides virtual hooks you can override to perform extra validation. Just see the virtual methods in the dbEditHelper declaration.
  44.  
  45. dbBrowseHelper
  46. Mixin for a list window. Mainly handles standard commands like dbAdd, dbEdit, dbDelete, dbDoubleClick.
  47.  
  48. dbDocHelper
  49. Mixin for a Document class. Abstracts launching edit dialogs etc. in response from the Browser commands.
  50.  
  51. dbWindowFactory
  52. Abstract base class. Lightweight factory objects are defined for each dialog and browser window. This uncouples application-specific windows from the OOFILE framework.
  53.  
  54.  
  55. ISSUES TO CLEAR UP
  56. 1) linking buttons to embedded tables
  57. want an easy way to say that an Add and Del button belong to a specific embedded table. Maybe have an actual field for these kind of buttons, that generates the Listener links. How get around the default of having the pane listen to all controls?
  58.  
  59.  
  60. 2) What's the mapping between the Add button on a list window and the menu item/parent command that adds a record? If we give in on the issue of having buttons despatch commands, this implies that the list window either
  61.    a) can generate Add/Edit dialogs, or
  62.    b) knows its caller and can pass this one up the chain
  63.       (which sounds a LOT like chain of command!!!! - so why duplicate?)
  64.  
  65.