Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!caen.engin.umich.edu!camber From: camber@caen.engin.umich.edu (Gregory Peters) Newsgroups: comp.sys.mac.hypercard Subject: Re: "Real" hypertext? Summary: Almost possible Keywords: hypertext Message-ID: <441a3cdf.5e37@dl5e37.engin.umich.edu> Date: 28 Jun 89 15:26:00 GMT References: <9158@phoenix.Princeton.EDU> <19941@cup.portal.com> Reply-To: camber@caen.engin.umich.edu (Gregory Peters) Organization: caen Lines: 41 In article <19941@cup.portal.com> Andre_Louis_Marquis@cup.portal.com writes: >Has anyone thought about adding what, for the lack of a better phrase, I will c >"real hypertext." to Hypercard or SuperCard. By hypertext, I mean the ability >to link a span of text in a field to a command. > >In Hyper/SuperCard, you can create a text field and put transparent buttons ove >the text field so when the user click on a word, a command is executed. >Unfortunately, if the text is edited, all the buttons have to be moved. It's a >real mess if the field can scroll. > >As far as I know, it is impossible to catch all the editing events that affect >field (character insertion, cuts, pastes, etc.) or find the bounding box of a >span of text, so hypertext can not be implemented by clever scripting. > >Does anyone have any illuminating thoughts? You can get "real" hypertext of a sort with the new "selected" expressions. 1. Lock the text on the field in question. 2. Put the following in the script for the field: on mouseUp lock screen set the locktext of me to false click at the clickloc click at the clickloc get the selectedtext set the locktext of me to true unlock screen -- Do whatever you want with the obtained text from here -- You may even want to pass it to the card or background -- if you have several fields which may reference the same -- word. end mouseup Good Luck! Greg Peters (camber@caen.engin.umich.edu)