Thanks for the pointers to Hashing functions! Im putting together a file re-namer utility. drag n drop file from file system to 4D window, allow the user to do various renaming functions with the files/folders. i.e. add/change/remove an extension, rename, make visible/invisible, add/remove characters, Case manipulation etc.
In 4D the file system objects are displayed in an array based list box. I display a small icon (screen grab of generic file and folder icons) to visually show the user what the file system object is. I thought that since I already had this data tied to the row (file or folder) I could use it, the icon/picture, rather then have to 'duplicate' this data. Some functions pertain only to files - filename extensions, and some pertain only to folders - <do stuff> with content. It was simpler to just 'duplicate' the data by saving a file system object type into another array; then to pursue using the icon/picture as the key, especially as FIND IN ARRAY doesn't work on pictures. Chip On Fri, 14 Jul 2017 14:00:45 +1000, David Adams via 4D_Tech wrote: > I don't really understand you're using icons as keys, but if you do go with > a hashing solution (clever idea!), the HashTools component from some years > back supports text, blobs, pictures, and documents. It offers a variety of > hash functions. Instead of an 'expensive' cryptographically oriented hash > like MD5, the HashTools functions return a simple longint quite quickly. > This is the sort of hashing you would normally use for calculating what > "bucket" to put data in within a hash table, for example. > > The HashTools Component > http://kb.4d.com/assetid=41107 > > Optimizing Searches with Hashes > http://kb.4d.com/assetid=41108 > ********************************************************************** > 4D Internet Users Group (4D iNUG) > FAQ: http://lists.4d.com/faqnug.html > Archive: http://lists.4d.com/archives.html > Options: http://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ********************************************************************** --------------- Gas is for washing parts Alcohol is for drinkin' Nitromethane is for racing ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************