Hypertext and URLs
Posted: Tue Feb 14, 2006 1:35 pm
Hi there,
I'm writing an editor that has to support hypertext links, but I can't use AllTagsArePChars because I'm using tags for other purposes elsewhere in the code. So I'm looking for advice on the best method of storing and retrieving the URLs associated with hypertext links, using the item tags.
One option is to store the URLs in a StringList as name-value pairs, with some arbitrary number generated for each item:
123456=http://hotpot.uvic.ca/
234567=http://www.halfbakedsoftware.com/
and then retrieve them like this:
URLList.Values[IntToStr(MyRichView.GetItemTag(ItemNo))]
I'd have to ensure the tag values were all unique, of course. Does this seem like a reasonable approach? Has anyone else faced this problem and found a better solution?
All help appreciated,
Martin
I'm writing an editor that has to support hypertext links, but I can't use AllTagsArePChars because I'm using tags for other purposes elsewhere in the code. So I'm looking for advice on the best method of storing and retrieving the URLs associated with hypertext links, using the item tags.
One option is to store the URLs in a StringList as name-value pairs, with some arbitrary number generated for each item:
123456=http://hotpot.uvic.ca/
234567=http://www.halfbakedsoftware.com/
and then retrieve them like this:
URLList.Values[IntToStr(MyRichView.GetItemTag(ItemNo))]
I'd have to ensure the tag values were all unique, of course. Does this seem like a reasonable approach? Has anyone else faced this problem and found a better solution?
All help appreciated,
Martin