gettingstarted
[Top] [All Lists]

Re: Preferences

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Preferences
From: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Thu, 31 Mar 2005 08:52:57 -0600
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <67 dot 41d03091 dot 2f7cd0e8 at aol dot com>
At 11:04 PM -0500 3/30/05, GAmoore at aol dot com wrote:

But using Joe's idea... as I understand it... I can write preferences like

01red
03blue
09green

I'd write it more like this:

commentColor=red
keywordColor=blue
numColor=green

and so on. Then, when you read in each line, use Split or NthField to find the key (commentColor) and value (red), then use a big Select Case statement to do the appropriate thing with this pair. (Or, as Seth suggested, use a Dictionary.)

Otherwise, you have the idea (and the benefit) exactly right.

Best,
- Joe

--
,------------------------------------------------------------------.
|    Joseph J. Strout           REAL Software, Inc.                |
|    joe at realsoftware dot com       http://www.realsoftware.com        |
`------------------------------------------------------------------'
_______________________________________________
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>

<Prev in Thread] Current Thread [Next in Thread>