Mouser:
If I may ask. Why are you going thru all the work of creating a config file format when you could be using an INI file formatted configuration file that would be IMHO more flexible. Let me illustrate with an INI file that would do
the same as what you describe & yet could also have multiple instances of your file in the same file.
[Applications]
001=UltraEdit - mouser
002=MS Word - dragonrider
003=Powerpoint
004=Project Dogwaffle
005=UltraEdit - dragonrider
; As many applications can go here as desired. Just don't have any embedded empty lines in any of the sections.
; I know that comments can be inserted into an INI file, but I honestly don't remember how. I think that any
; lines that are isolated by blank lines from a section are ignored, but I believe that there is an actual comment
; character(s) as well.
[UltraEdit - mouser]
Author=mouser
Date=06/10/2005
Homepage=https://www.donationcoder.com
Application=UltraEdit
FileRegEx=*.ue\.exe||*.ultraedit\.exe
UpdateURL=https://www.donationcoder.com/cheatsheeter/mouser/uedit/uedit.ipi
Hotkeys=UltraEdit - Hotkeys - mouser
Forum=UltraEdit Forum - mouser
Tips=UltraEdit Tips - mouser
[UltraEdit Forum - mouser]
Description=Visit the UltraEdit Online Forum
URL=http://www.ultraedit.com/index.php?name=Forums&c=1
Keywords=forum
[UltraEdit Tips - mouser]
Description=A list of tips and tricks for advanced users
URL=file://uedit_tips.html
Keywords=tip||trick
[UltraEdit - Hotkeys - mouser]
Hint=Common HotKeys for UltraEdit
Description=A simple list of hotkeys for UltraEdit, in html format. Suitable for small window display.
URL=file://uedit_hotkeys.html
Keywords=hotkey||shortcut
[UltraEdit - dragonrider]
Author=dragonrider
Date=06/11/2005
Homepage=http://www.freddiethefreeloader.com
Application=UltraEdit
FileRegEx=*.ue\.exe||*.ultraedit\.exe
UpdateURL=https://www.donationcoder.com/cheatsheeter/mouser/uedit/uedit.ipi
Hotkeys=UltraEdit - Hotkeys - dragonrider
Forum=UltraEdit Forum - dragonrider
Tips=UltraEdit Tips - dragonrider
[MS Word - dragonrider]
Author=dragonrider
[email protected]
version=1.2
Date=06/11/2005
Homepage=http://www.dragonrider.com
Application=Microsoft Word
FileRegEx=*.msword\.exe
UpdateURL=https://www.donationcoder.com/cheatsheeter/dragonrider/msword/msword.ini
Hotkeys=MS Word - Hotkeys - dragonrider
Forum=
Tips=MS Word Tips - dragonrider
Links=MS Word Links - dragonrider
[MS Word Links - dragonrider]
Description=A list of links for extra research and help.
URL=file://msword_links.htm
keywords=links||urls
[MS Word Tips - dragonrider]
Description=A list of tips and tricks for advanced users
URL=file://msword_tips.html
Keywords=tip||trick
[MS Word - Hotkeys - dragonrider]
Hint=Common HotKeys for MS Word
Description=A simple list of hotkeys for MS Word, in html format. Suitable for small window display.
URL=file://msword_hotkeys.html
Keywords=hotkey||shortcut
The benefits of having an INI file instead of a proprietary format are:
* many DLLs & function libraries that can handle INI files in many different programming languages.
* the sections don't have to be in any particular order.
* more than 1 applications sheets can be described in a single file.
* more than 1 version of the same application can be described in a single file (see UltraEdit - 1 & 2)
* because its 1 file instead of many, it is much faster to load the info. from the file into the program.
* Additional fields can be created on the fly (see "MS Word - dragonrider" section) like version & email.
To update this file with new sheets would just require CheatSheet to:
* get the files from donationcoder.com
* if the file set exists already on the local PC, ask to user if they want to overwrite or add it to their
list of sheets
* If yes, then overwrite the files with the new ones.
* If no, then make new names for the files.
* take the required information out of the application INI files & write it into the main INI file.
As usual, I'm not trying to force this on you. I'm just suggesting the possible benefits of this approach.
Regards
Dragonrider