home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / hypertxt / hyper.txt < prev    next >
Text File  |  1992-03-29  |  3KB  |  64 lines

  1. INTRO
  2.  
  3. I started this project because I needed some sort of hypertext application
  4. and didn't want to spend $50 on the Help compiler and have all
  5. my files show up as help files.  While not as powerful as that product, it
  6. looks to be easier to use.  It's in a rough state now, but the
  7. general methods should be clear.  Also, this way you can refine it into
  8. the exact type of system you need.  Everything is public domain, but there
  9. are no guarantees it'll work and not eat your data for breakfast.
  10.  
  11. FILE STRUCTURE
  12.  
  13. The first line of a .HYP file is the name of the "database."
  14. The topics then follow.
  15.  
  16. Each topic's first line is the title.  Then come up to four "keywords."
  17. (If you need to change this, or any other limit, look in the global 
  18. module.)  At present keywords must be letters and numbers only, all caps, 
  19. with no punctuation or spaces except for the underscore.
  20.  
  21. The main body text is set off by lines containing only one double quote(").
  22. Between these two lines, you can place any text you like, including blank
  23. lines.  Here's where you "embed" keywords (just putting them there will do
  24. fine, the program will know them when it sees them).  Since all 
  25. punctuation gets removed, you can use it if it's needed, as long as you
  26. don't include it in the actual keyword (i.e. keyword: FREDS_HEAD,
  27. embedded as: "also known as FRED'S_HEAD by Australians.").
  28.  
  29. Test.Hyp is a small sample file that should make everything clear.  
  30. Note such things as YAMATO and YAMATO_CLASS both referencing the 
  31. same card and the fact that double-clicking "Shinano" doesn't select 
  32. its own card since it's not all caps.
  33.  
  34. THE PROGRAM
  35.  
  36. The Index file controls are simply a way of getting at the .HYP file.  The
  37. fun starts once you've loaded it.  The list is set to sort the items; if
  38. you enter them in some sort of sequence in the .HYP file, you can turn
  39. sorting off to maintain your structure.
  40.  
  41. Once you select a topic, the topic form comes up.  Double-clicking on a
  42. keyword takes you to the appropriate topic.  The double-click itself is
  43. a kludge; VB interprets a double-click in a text box as a word selection.
  44. There's a timer on the form that checks for selections several times a
  45. second.  It makes sure the word is upper case and strips any punctuation
  46. that may have also been selected (now you see why punctuation and spaces
  47. aren't allowed in keywords [they only have to be upper case in order to
  48. stand out, since you can't have text attributes for individual words in
  49. a text box]).
  50.  
  51. You can also return to the index from a topic or back up to a previous
  52. topic.  The backup methodology is kinda crufty too, but gets the job done.
  53.  
  54. CONCLUSION
  55.  
  56. All in all, everything works "out of the box" if you don't want to mess
  57. with it, but could stand some refinement.  This makes it easy to
  58. incorporate into your own programs, since you won't need to undo a
  59. complicated interface.
  60.  
  61.  
  62.                     Wendell Martin
  63.                     73737,1237
  64.