home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!netmbx!jrobie
- From: jrobie@netmbx.netmbx.de (Jonathan Robie)
- Subject: Re: Covariant Types in Derived Classes
- Organization: netmbx, Berlin, Germany
- Date: Mon, 27 Jul 1992 08:22:59 GMT
- Message-ID: <1MH5C0K@netmbx.netmbx.de>
- References: <VKE52M@netmbx.netmbx.de> <712030928snx@trmphrst.demon.co.uk>
- Lines: 55
-
- nikki@trmphrst.demon.co.uk (Nikki Locke) writes:
-
- >> Not so. A report generator might start by showing me the default
- >> printout for an object. I can grab fields with my mouse and move
- >> them around or delete them.
- >>
- >> A user interface tool might allow me to do something similar by providing
- >> me with a default, editable window.
- >>
- >The report generator and the user interface tool does not _require_ RTTI.
- >The objects to be displayed/reported on should return a Collection of field
- >specifiers from a virtual function. These field specifiers can then be
- >placed on a menu for user selection and placement. The field specifier
- >will contain virtual functions to format, display, validate and set the
- >value of each field. A generic user interface object can then be
- >constructed to use these methods for displaying and/or editing the field.
-
- Now for the key question: where does this Collection of field specifiers
- come from? Are you implying that the *user* needs to code all this? It
- should not be available to a general library class?
-
- Why not allow default display using exactly the same information used by
- the debugger?
-
- The alternative is to require a programming strategy like this:
-
- 1. Design the class you need
- 2. Write code to print objects of this class
- 3. Write code to store objects of this class in a database
- 4. Write code to display objects of this class
- 5. Write code to input and edit objects of this class
-
- We all agree that reliable code is our goal. General purpose tools
- which can largely automate steps 2-5 will greatly reduce the amount
- of code that needs to be written for each class.
-
- It is just possible that some of this code contains errors.
-
-
- Jonathan
-
- ===========================================================================
-
- Jonathan Robie jrobie@netmbx.UUCP
- Arnold-Zweig-Str. 44 jrobie@netmbx.in-berlin.de
- O-1100 Berlin
- Deutschland Phone: +37 (2) 472 04 19 (Home, East Berlin)
- +49 (30) 342 30 66 (Work, West Berlin)
-
-
- --
- Jonathan
-
- ===========================================================================
-
-