Title: Disabled Searches - Here I go again

OK,,, I have done some thinking about the disabled searches thing.  I ** think** I have an idea that will work well and **should** be fairly easy to implement (for a fairly adept coder).  The only time this solution will have any kind of performance issue is when the user is intentionally trying to enable/disable searches or viewing the help screen (which probably rarely happens with the utility of qsfind).  Thus the slight hit then would be worth it for the enable/disable ability.


What we have:
1. A mechanism in the help screen to check / uncheck searches
2. The fact that searches named *.xml_disabled do not load

What we need:
1. A method that renames a search based on whether it is checked / unchecked
2. A way to enable disabled searches that aren't loaded in memory

What I propose:
1. On start up DQSD only loads enabled searches (ones named *.xml) like it already does
2. The help screen only loads enabled searches by default (change would be to ignore disabledsearches.txt)
3. The help screen gets a check box or button that causes the *.xml_disabled files to get loaded which will allow the file to be enabled.  This will be a one-time performance hit while the disabled searches are loaded but worth it as it is specifically something you'd want to do (else you wouldn't be doing it)

4. Closing the help screen renames search files to *.xml or *.xml_disabled as appropriate
5. Closing the help file also deletes and re-creates disabledsearches.txt (why later).  The searches are listed in this file by original file name (*.xml)

6. Closing the help screen also dumps and reloads DQSD (so that only enabled searches are loaded thus freeing up resources) <-- not a requirement

The only problem left that I can think of is what happens after upgrade… here's where disabledsearches.txt comes in…
1. If disabledsearches.txt exists, the installer deletes *.xml_disabled
2. If disabledsearches.txt exists, some function in the installer opens disabledsearches.txt and builds an array of files to  rename to *.xml_disabled and does the deed for us.

Does this make sense?  Does it sound possible?  Am I missing anything?  Thoughts?


The list has been quiet for a while, so I thought I'd stir it up again.

JB



John W. Bairen, Jr.
  www.bairen.net

Reply via email to