home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / hypercar / 4098 < prev    next >
Encoding:
Internet Message Format  |  1992-11-06  |  3.1 KB

  1. 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
  2. From: derthanq@oregon.uoregon.edu (Victor Der-Thanq Chen)
  3. Newsgroups: comp.sys.mac.hypercard
  4. Subject: Re: How to get rid of the clicktext
  5. Message-ID: <5NOV199219443992@oregon.uoregon.edu>
  6. Date: 6 Nov 92 03:44:00 GMT
  7. Article-I.D.: oregon.5NOV199219443992
  8. References: <4NOV199220221807@oregon.uoregon.edu> <1992Nov6.104053.1@csc.canterbury.ac.nz>
  9. Sender: news@nntp.uoregon.edu
  10. Organization: University of Oregon
  11. Lines: 62
  12. News-Software: VAX/VMS VNEWS 1.41
  13.  
  14. In article <1992Nov6.104053.1@csc.canterbury.ac.nz>, clas005@csc.canterbury.ac.nz writes...
  15. >In article <4NOV199220221807@oregon.uoregon.edu>, 
  16. >derthanq@oregon.uoregon.edu (Victor Der-Thanq Chen) writes:
  17. >> I am doing something using the clicktext in a field.  In the openfield handler
  18. >> I check the value of the clicktext.  If it is empty, do nothing, otherwise do
  19. >> something.
  20. >> 
  21. >> The problem I have is that when the sencond pass of using the clicktext, even
  22. >> thoug I do not click on anything, the clicktext still returns the previously
  23. >> clicked text.
  24. >It is absolutely true that the value The ClickText is persistent. 
  25. >But this just means you probably should not check that way. A mouseUp handler 
  26. >will have the virtue that it won't be called unless there was, at 
  27. >least, a click. Then, if the click was on a word, there will be 
  28. >clickText; if not, the clickText will be empty. Your difficulty 
  29. >is caused by the fact that you are checking in an openField 
  30. >handler.
  31. >If you *must* do it the way you are doing, use "click at the loc 
  32. >of me" to clear the ClickText. -- matt
  33.  
  34. I don't think click at the field itself will work.  I have a field-ful of text.
  35. Clicking at the loc of the field will end up clicking at some other text.
  36.  
  37. Let me address my question more specifically.  Here is the script in a 
  38. background field:
  39.  
  40. on openfield
  41.   if "Page" is in the clicktext
  42.   then
  43.     visual effect dissolve
  44.     go card word 2 of the clicktext
  45.   else
  46.     doUnderline
  47.   end if
  48. end openfield
  49.  
  50. You may consider my stack as an electronic book.  Every card has a page number.
  51. This particular field contains all the text in the stack.  You may see it as
  52. a whole text.  In the field, I put page numbers among the text so that the user
  53. knows which part of the text belongs to which page.
  54.  
  55. This field does two things.  If the user clicks at the page number, he/she will
  56. be able to go to that page.  If the user select something (e.g. hold down the
  57. mouse and drag), the selected text will be hilighted (underline).
  58.  
  59. Apparently, I cannot use the mouseup handler, because I want the users to be
  60. able to select something.
  61.  
  62. It works just fine to go to a page.  But if I come back from that page to the
  63. "whole text" page and click on, say, the arrows of this scrolling field, the 
  64. openfield message got sent and HC will take me back to the page I previously
  65. was on, because the clicktext was not cleared.
  66.  
  67. So, given the environment, can any one come up with a neat solution?
  68.  
  69. Thanks in advance.
  70.  
  71. Victor Chen
  72.  
  73. derthanq@oregon.uoregon.edu
  74.