On Fri, 23 Jul 1999, Jacqueline Landman Gay wrote:
> Marni Centor <[EMAIL PROTECTED]> wrote:
> >
> > I've done some work with hypertext links in my projects, but I've been
> > able to use a combination of lookup tables and custom properties to
> > accomplish the task. What are the reasons that this approach wouldn't
> > work for you?
>
> The project is an editor in which the user creates links, so I won't have any
> idea ahead of time what those links will be. This could be worked around with
> a dynamic lookup table, I suppose, but the client wants to create links that
> will periodically use the same text to go to different places, depending on
> the current context. So, a particular phrase could link one place in one case
> and somewhere else in another. I need a way to store the specific destination
> with each link, because a lookup table will fail.
>
> The only other idea I've thought of is to store duplicates of the field's
> htmltext outside of the visible field and calculate link destinations by
> getting the clickChunk and then scanning forward through the text until I find
> the link info.
>
> I've tried to talk him out of duplicate link phrases, believe me. :)
How about saving the character offset in the index and using the
clickChunk to do the lookup? The only place where this gets hairy is
if the user could be editing text before where the links have been
defined because you'll need to keep updating the index with each
keystroke.
Regards,
Scott
> --
> Jacqueline Landman Gay | [EMAIL PROTECTED]
> HyperActive Software | [EMAIL PROTECTED]
> Custom hypermedia solutions | http://www.hyperactivesw.com
> 612.724.1596 | 612.724.1562 - fax
>
********************************************************
Scott Raney [EMAIL PROTECTED] http://www.metacard.com
MetaCard: You know, there's an easier way to do that...