by awschwab on Tue Feb 05, 2002 2:11 pm
I am curious about the way Note() will return its position in the text. What I would really like to do is to give it a DB name to open, and a string to find, have it open the DB, (perhaps a particular record of the DB -- a specific memo for instance) find the string within that record, and allow the user to select nearby text. On return, I would like to have the selected text as a string to work with, without modifying the original DB. I would parse the string, and put entries into several fields based on what I found. This would be a great way to give programs access to data stored as ordinary text files.
If I understand correctly, Note() currently will allow either specifying the record to open, or searching for a string, but not both. (No, I could use two Note() calls: find name mode to determine the index, then open by index, searching for the string. That would do it!) I could probably have the user copy the selected text, and get at it with Fctl(PASTE,ID). If I don't require the user to copy, and use the soon-to-be-available cursor position returned by Note(), I won't have access to the selection.
If the above makes any sense, would you consider whether a bit set in the Note() command might make it return a string consisting of the selected text?
Or would it make more sense to use the new Field searching and sorting capabilities instead of Note() for this?
Edited by - awschwab on 02/05/2002 08:18:33