home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / next / programm / 5682 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  2.4 KB

  1. Path: sparky!uunet!wupost!usc!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!noc.msc.net!gacvx2.gac.edu!gacvax2!scott
  2. Newsgroups: comp.sys.next.programmer
  3. Subject: Re: Drag&drop of colors in Views - how does -acceptColor: atPoint: work?
  4. Message-ID: <SCOTT.92Aug18194208@nic.gac.edu>
  5. From: scott@nic.gac.edu (Scott Hess)
  6. Date: 18 Aug 92 19:42:08
  7. References: <SCOTT.92Aug17092008@nic.gac.edu> <1992Aug18.063238.3891@bosslogic.com>
  8. Organization: Gustavus Adolphus College
  9. Nntp-Posting-Host: nic.gac.edu
  10. In-reply-to: pclark@bosslogic.com's message of Tue, 18 Aug 1992 06:32:38 GMTLines: 40
  11. Lines: 40
  12.  
  13. In article <1992Aug18.063238.3891@bosslogic.com>
  14.     pclark@bosslogic.com (Pete Clark) writes:
  15. >In article <SCOTT.92Aug17092008@nic.gac.edu>  writes:
  16. >> So, what's up?  Am I just not doing something right?  There's not
  17. >> much area to go wrong, here, and I've checked the spelling against
  18. >> the documentation about a billion times.  It just doesn't seem to
  19. >> work.  Anyone out there got an example of receiving colors for your
  20. >> View?
  21. >
  22. >    This class works as expected under 3.0PR2. The instance of
  23. >MyView is a subview of a Box, which is in a Window.
  24.  
  25. In order to hamstring the minor groundswell of response I've been
  26. receiving, I figure I'll post this on the net and let everyone in
  27. on The Real Dope.  The method _does_ work, with qualifications.
  28. Apparently, if the receiving View is flipped, the test for whether
  29. the swatch is in the View is wrong, so you don't get the message
  30. when the drop is in the View - you get it when the drop is _above_
  31. the View!  [Didn't they use View's -mouse:inRect:?]
  32.  
  33. In any case, there are a couple alternatives.  An obvious and
  34. workable one is to do [myView setFlipped:NO].  I did that, and
  35. things work awesome.
  36.  
  37. Another solution is the NextAnswers solution.  It uses a +poseAs:
  38. on NXColorPanel which overrides +dragColor:withEvent:fromView: to
  39. do things the right way.  I'm sure this works fine - it is a bit
  40. involved, though.  Unflipping the View works much better with less
  41. fuss and muss, when applicable.
  42.  
  43. [Some might ask "Why didn't scott check NextAnswers in the first
  44. place?"  I did.  My index was screwed up, though, so the search
  45. didn't turn up anything ...]
  46.  
  47. Later,
  48. --
  49. scott hess <shess@ssesco.com>  <Who achieved programmer nirvana on Aug 11th>
  50. 12901 Upton Avenue South, #326  Burnsville, MN 55337 (612) 895-1208 Anytime!
  51.    <Text: One Class to bring them all and in the darkness bind them ...>
  52.  
  53.