home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 22251 < prev    next >
Encoding:
Text File  |  1993-01-27  |  2.3 KB  |  47 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!pageworks.com!world!eff!news.byu.edu!gatech!asuvax!ncar!csn!qwerty-gw.fsl.noaa.gov!yoda.fsl.noaa.gov!urban
  3. From: urban@yoda.fsl.noaa.gov (Art Urban)
  4. Subject: TCL: Bit Off More Than I Can Chew...
  5. Message-ID: <1993Jan26.191352.25596@fsl.noaa.gov>
  6. Sender: urban@fsl.noaa.gov 
  7. Organization: Forecast Systems Lab, NOAA, Boulder CO, USA
  8. Date: Tue, 26 Jan 1993 19:13:52 GMT
  9. Lines: 36
  10.  
  11. Up until recently, I was very pleased with my DragOutlineTask object. I had
  12. successfully called DragGrayRgn() in the KeepTracking() method, and went
  13. about my business. But then I thought, I want this to AutoScroll() should I
  14. need it to. Okay, so I hunkered down and wrote a sly little dragHook
  15. actionProc which in turn called a DoWhileDragging() method of
  16. DragOutlineTask (I didn't even think this would work, but it does. I
  17. defined my *own* this pointer, and lo and behold, it correctly pointed to
  18. the current object! This is almost scary...)
  19.  
  20. So, back in DoWhileDragging() method, I get the current mouse location and
  21. massage it to work with AutoScroll(). The strange thing is, the scrolling
  22. does take place, but now drawing is occuring all over the grafPort, and I
  23. suspect it has something to do with AutoScroll changing the Origin while
  24. DragGrayRgn() is trying to do its work, but I really don't know.
  25.  
  26. I couldn't help notice that CMouseTask is set up to repeatedly receive
  27. KeepTraking() calls. So to really pull off AutoScroll() it seems that I
  28. need to do it here, not via the dragHook proc. But since, DragGrayRgn()
  29. won't release events until the mouse is up, I can't usefully call
  30. AutoScroll() with the current mouseLoc. 
  31.  
  32. So my quandry is this: Should I try to fix the implementation which uses
  33. the call to DragGrayRgn() (and how do I do this?), or should I try to write
  34. my own region dragging code so I can benefit from the utility of the
  35. KeepTracking() method?
  36.  
  37. Now it seems to me, that somebody has probably done one or the other
  38. already. So, if you have code you can share, I'd appreciate it. I really
  39. don't want' to get into GWorlds at this point in my learning curve...
  40.  
  41. Thanx!!!
  42. -- 
  43. Art Urban                             urban@yoda.fsl.noaa.gov
  44. ===============================================================================
  45.  "Look, he's being attacked by creamy nugget centers."              -Joel
  46. ===============================================================================
  47.