home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / SYSTOOLS / README.TXT < prev    next >
Encoding:
Text File  |  1998-01-11  |  9.4 KB  |  261 lines

  1.                        Last Minute News on SysTools 2
  2.                        ==============================
  3.  
  4. This file describes changes, additions, and clarifications to SysTools that
  5. do not appear in the printed documentation. Please print and read this file
  6. prior to using SysTools, and save it for future reference. It includes the
  7. following sections, which are organized according to the topic/module to
  8. which they apply:
  9.  
  10.  
  11.     1. Additions/Changes
  12.     2. Known Issues
  13.     3. Manual Errata
  14.  
  15.  
  16. 1. Additions/Changes
  17. ==============================================================================
  18.  
  19. TStExpression
  20. -------------
  21. The TStExpression component was added in version 2.01 and is not documented
  22. in the printed manual or on-line help.  See STEXPR.TXT in the SysTools
  23. directory for additional information.
  24.  
  25.  
  26. TStExpressionEdit
  27. -----------------
  28. The TStExpressionEdit component was added after the manual and help were
  29. finalized.  It is not documented in the printed manual or on-line help. See
  30. STEXPR.TXT in the SysTools directory for additional information.
  31.  
  32.  
  33. StAstroP
  34. --------
  35. StAstroP - The PlanetsPos function was changed to a procedure with the
  36. function result changed to a var (reference) parameter. This change allows
  37. the routine to be used in C++Builder applications as well as Delphi.
  38.  
  39.   procedure PlanetsPos(JD : Double; var PA : TStPlanetsArray);
  40.  
  41.  
  42. TStBarCode
  43. ----------
  44. A new method was added:
  45.  
  46. procedure SaveToFile(const FileName : string);
  47.  
  48. => SaveToFile writes the bar code image to a file.
  49.  
  50. This routine allows you to save the displayed bar code as a bitmap file
  51. (.BMP).
  52.  
  53.  
  54. TStString
  55. ---------
  56. StString now has a default index property (AtIndex) that allows access to
  57. the character at a given index within the string buffer. This allows
  58. operations such as:
  59.  
  60.   OStr[8] := 'g';     or      MyChar := OStr[4];
  61.  
  62. If an index is accessed that is outside the confines of the string buffer,
  63. an EStStringError exception will be raised with the message "Index out of
  64. string bounds". This property is affected by the OneBased property.
  65.  
  66.  
  67. TStDictionary
  68. -------------
  69. The manual doesn't make it very clear that the Hash property and the Equal
  70. property are linked in terms of their functionality. If you use a hash
  71. function that calculates a case-insensitive hash of a string then the Equal
  72. function must perform a case-insensitive comparison of two strings. If the
  73. hash function calculates a case-sensitive hash, then the Equal function must
  74. perform a comparison that is case-sensitive as well. If you do not ensure
  75. this behavior, the effect may be that you will "lose" strings in the string
  76. dictionary (in other words, you might not be able to find a string you just
  77. inserted).
  78.  
  79. Some late testing of the hash function used by default in the SysTools
  80. string dictionary class has shown that, although it performs well when
  81. hashing random strings, it performs badly when hashing strings that have
  82. a great deal of similarity with each other.
  83.  
  84. Two new hash functions have been added to the STDICT unit: AnsiELFHashText
  85. (case-insensitive hash) and AnsiELFHashStr (case-sensitive hash), both of
  86. which use the UNIX ELF hash algorithm. It is highly recommended that you do
  87. not accept the default hash function that is set up by the Create
  88. constructor of the class. Immediately after you have created a string
  89. dictionary instance, replace the hash function with one of the new ones,
  90. as the following code shows:
  91.  
  92. MyDict := TStDictionary.Create(MyNodeCount);
  93. MyDict.Hash := AnsiELFHashText;
  94.  
  95. Doing this as a matter of course in your code will ensure that the
  96. efficiency of the string dictionary is maintained for all input strings.
  97. We decided against modifying the default behavior of the string dictionary
  98. since there may be users who are dependent on the existing implementation.
  99.  
  100. function AnsiELFHashText(const S : string; Size : Integer) : Integer;
  101.   Case-insensitive ELF hash function
  102.  
  103. This function converts the input string S to uppercase using the current
  104. language driver, and then calculates the ELF hash of the result. An ELF
  105. hash is a well-known hash function originally devised for the UNIX
  106. operating system.
  107.  
  108. function AnsiELFHashStr(const S : string; Size : Integer) : Integer;
  109.   Case-sensitive ELF hash function
  110.  
  111. This function calculates the ELF hash of the input string S. An ELF
  112. hash is a well-known hash function originally devised for the UNIX
  113. operating system.
  114.  
  115.  
  116. TStTrayIcon
  117. -----------
  118.  
  119. The following properties are not in the printed manual but do appear in
  120. the help file:
  121.  
  122.   Animate
  123.   Images
  124.   ImageIndex
  125.   Interval
  126.  
  127. When restoring the application via code use TStTrayIcon.RestoreApplication
  128. rather than Application.Restore.
  129.  
  130. When starting an application in the normal state and with the HideOnRestore
  131. property set to true you will need to manually remove the icon from the
  132. tray when the application starts. For example:
  133.  
  134.   procedure TForm1.FormCreate(Sender: TObject);
  135.   begin
  136.     if (WindowState <> wsMinimized) and (StTrayIcon1.HideOnRestore) then
  137.       StTrayIcon1.DeleteFromTray;
  138.   end;
  139.  
  140.  
  141. TStVersionInfo
  142. --------------
  143.  
  144. TStVersionInfo does not raise an EFOpenError as the manual states. Instead,
  145. an EStVersionInfoError exception is raised if the file cannot be found.
  146.  
  147. TStVersionInfo raises an exception if the key specified in the GetKeyValue
  148. method is not found.
  149.  
  150. TStVersionInfo may on occasion raise an exception when creating the value
  151. of the FileVersionFloat and ProductVersionFloat properties. This is normal
  152. but the exception will show in the IDE if Break on Exceptions is on.
  153.  
  154.  
  155. TStFormatDrive
  156. --------------
  157. The OnFormatError event is not documented in the manual but is in the
  158. help file.
  159.  
  160.  
  161. TStFileOperation
  162. ----------------
  163.  
  164. TStFileOperation can appear to behave erratically when the foNoErrorUI
  165. value of the Options property is on. This is due to oddities in the shell's
  166. implementation of SHFileOperation. For best results leave foNoErrorUI off.
  167.  
  168.  
  169. Shell Functions Not Documented in the Printed Manual
  170. ----------------------------------------------------
  171.  
  172. GetSpecialFolderPath
  173. --------------------
  174. Delphi:
  175.   function GetSpecialFolderPath(Handle : HWND;
  176.                                 Folder : TStSpecialRootFolder) : string;
  177.  
  178. C++Bulder:
  179.   AnsiString __fastcall GetSpecialFolderPath(HWND Handle,
  180.                                              TStSpecialRootFolder Folder);
  181.  
  182. This function returns the path to a shell special folder. Handle is the
  183. window handle that will act as the owner of any dialogs that the shell
  184. displays during the operation. Folder is the shell special folder for which
  185. to obtain the path. The following example will return the path to the
  186. desktop folder:
  187.  
  188. Delphi:
  189.   var
  190.     S : String
  191.   ...
  192.     S := GetSpecialFolderPath(Handle, sfDesktop);
  193.  
  194. C++Builder:
  195.   String S = GetSpecialFolderPath(Handle, sfDesktop);
  196.  
  197.  
  198. GetSpecialFolderFiles
  199. ---------------------
  200. Delphi:
  201.   procedure GetSpecialFolderFiles(Handle : HWND;
  202.                                   Folder : TStSpecialRootFolder;
  203.                                   Files : TStrings);
  204.  
  205. C++Builder:
  206.   void __fastcall GetSpecialFolderFiles(HWND Handle,
  207.                                         TStSpecialRootFolder Folder,
  208.                                         TStrings* Files);
  209.  
  210. GetSpecialFolderFiles will return the list of files in a shell special
  211. folder. Handle is the window handle that will act as the owner of any
  212. dialogs that the shell displays during the operation. Folder is the shell
  213. special folder for which to obtain the list of files. Files is the TStrings
  214. descendant which will receive the list of files. The following example
  215. adds the list of files in the recent documents folder into a list box:
  216.  
  217. Delphi:
  218.   GetSpecialFolderFiles(sfRecentFiles, ListBox.Lines);
  219.  
  220. C++Builder:
  221.   GetSpecialFolderFiles(sfRecentFiles, ListBox->Lines);
  222.  
  223.  
  224. 2. Known Issues
  225. ==============================================================================
  226.  
  227. Compiler Error Using Shell Components in BCB 1
  228. ----------------------------------------------
  229. There is an error in one of the Inprise-generated headers which causes a
  230. compiler error in any application using the shell components. The problem is
  231. a blank line in REGSTR.HPP. If you are using BCB 1 you can edit REGSTR.HPP
  232. and delete the offending line (the compiler will point out the problem line).
  233. We doubt there is any other work-around for this problem since the headers
  234. are provided by Inprise.
  235.  
  236. Using Orpheus and SysTools TStVersionInfo Component in BCB
  237. ----------------------------------------------------------
  238. If you use the TStVersionInfo component in a project which also uses
  239. Orpheus you may get a compiler error in StVInfo.hpp. The problem is that
  240. TStVersionInfo has a property called ProductName and Orpheus has a constant
  241. by the same name. The workaround is to move the include for StVInfo.hpp
  242. above the includes for all Orpheus header files. This will be fixed in the
  243. next release of Orpheus.
  244.  
  245.  
  246. 3. Manual Errata
  247. ==============================================================================
  248.  
  249. The StUtils unit is documented as containing the DateTimeToStTime,
  250. DateTimeToStDate, StTimeToDateTime, and StDateToDateTime routines, but they
  251. are actually in the StDate unit.
  252.  
  253. References to the TStShortCut.Location property in the manual should say
  254. LocationType.
  255.  
  256. References to the TStShortCut.ShortcutName property in the manual should say
  257. ShortcutFileName.
  258.  
  259. The page numbers shown in the index are off by 2.
  260.  
  261.