home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!cs.uoregon.edu!news.uoregon.edu!nntp.uoregon.edu!oregon.uoregon.edu!derthanq
- From: derthanq@oregon.uoregon.edu (Victor Der-Thanq Chen)
- Newsgroups: comp.sys.mac.hypercard
- Subject: Re: How to get rid of the clicktext
- Message-ID: <5NOV199219443992@oregon.uoregon.edu>
- Date: 6 Nov 92 03:44:00 GMT
- Article-I.D.: oregon.5NOV199219443992
- References: <4NOV199220221807@oregon.uoregon.edu> <1992Nov6.104053.1@csc.canterbury.ac.nz>
- Sender: news@nntp.uoregon.edu
- Organization: University of Oregon
- Lines: 62
- News-Software: VAX/VMS VNEWS 1.41
-
- In article <1992Nov6.104053.1@csc.canterbury.ac.nz>, clas005@csc.canterbury.ac.nz writes...
- >In article <4NOV199220221807@oregon.uoregon.edu>,
- >derthanq@oregon.uoregon.edu (Victor Der-Thanq Chen) writes:
- >> I am doing something using the clicktext in a field. In the openfield handler
- >> I check the value of the clicktext. If it is empty, do nothing, otherwise do
- >> something.
- >>
- >> The problem I have is that when the sencond pass of using the clicktext, even
- >> thoug I do not click on anything, the clicktext still returns the previously
- >> clicked text.
- >
- >It is absolutely true that the value The ClickText is persistent.
- >But this just means you probably should not check that way. A mouseUp handler
- >will have the virtue that it won't be called unless there was, at
- >least, a click. Then, if the click was on a word, there will be
- >clickText; if not, the clickText will be empty. Your difficulty
- >is caused by the fact that you are checking in an openField
- >handler.
- >
- >If you *must* do it the way you are doing, use "click at the loc
- >of me" to clear the ClickText. -- matt
-
- I don't think click at the field itself will work. I have a field-ful of text.
- Clicking at the loc of the field will end up clicking at some other text.
-
- Let me address my question more specifically. Here is the script in a
- background field:
-
- on openfield
- if "Page" is in the clicktext
- then
- visual effect dissolve
- go card word 2 of the clicktext
- else
- doUnderline
- end if
- end openfield
-
- You may consider my stack as an electronic book. Every card has a page number.
- This particular field contains all the text in the stack. You may see it as
- a whole text. In the field, I put page numbers among the text so that the user
- knows which part of the text belongs to which page.
-
- This field does two things. If the user clicks at the page number, he/she will
- be able to go to that page. If the user select something (e.g. hold down the
- mouse and drag), the selected text will be hilighted (underline).
-
- Apparently, I cannot use the mouseup handler, because I want the users to be
- able to select something.
-
- It works just fine to go to a page. But if I come back from that page to the
- "whole text" page and click on, say, the arrows of this scrolling field, the
- openfield message got sent and HC will take me back to the page I previously
- was on, because the clicktext was not cleared.
-
- So, given the environment, can any one come up with a neat solution?
-
- Thanks in advance.
-
- Victor Chen
-
- derthanq@oregon.uoregon.edu
-