
Storing data associated with words
Oops, I intended to x-post this
Quote:
> I have a requirement to keep internal data associated with individual
words.
> These "words of interest" (WOI) will be inserted programmatically along
with
> a sort of "tag" or "reference" that I will use to identify the word as one
> of my WOIs. Now, this data associated with a WOI must stay associated
with
> the WOI (and only the WOI) regardless of user actions including typing,
drag
> and drop, etc. If the WOI is deleted, the data must also be deleted. I
> have been trying to use bookmarks but I am having serious problems and the
> work-arounds are getting ridiculous. Is there anything else that can be
> used for this that I may have missed?
> Here is what I have observed with bookmarks based on user actions,
relative
> to cursor and bookmark location:
> "This is |[another] test"
> (bookmark range matches "another" and cursor immediately bookmark)
> User types "test "
> Result - "This is [test |another] test"
> Note: Same thing happens when I insert text programmatically.
> There are also similar problems related to deleting one WOI
programmatically
> before inserting another WOI and ending up with overlapped bookmarks.
> Any suggestions?