home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5251 < prev    next >
Encoding:
Text File  |  1992-07-26  |  2.1 KB  |  54 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!haven.umd.edu!news.umbc.edu!umbc4.umbc.edu!brian
  3. From: brian@umbc4.umbc.edu (Brian Cuthie)
  4. Subject: Re: NXBrowser problem.
  5. Message-ID: <1992Jul27.021852.17584@umbc3.umbc.edu>
  6. Sender: newspost@umbc3.umbc.edu (News posting account)
  7. Organization: University of Maryland Baltimore Campus
  8. References: <SCOTT.92Jul23004939@nic.gac.edu>
  9. Date: Mon, 27 Jul 1992 02:18:52 GMT
  10. Lines: 42
  11.  
  12. In article <SCOTT.92Jul23004939@nic.gac.edu> scott@nic.gac.edu (Scott Hess) writes:
  13. >I've a situation where I need the action method for an NXBrowser
  14. >to modify the values in the browser.  Unfortunately, I've been
  15. >having some problems.  [This is under NS2.1.]
  16. >
  17. >An obvious incantation to reload the browser would be to incant
  18. >[browser loadColumnZero].  _But_, there's a problem here.  The
  19. >action method will have been called from a Matrix in the browser
  20. >- and loadColumnZero frees all of the columns and then recreates
  21. >them!  So, when you return from the action method after doing a
  22. >loadColumnZero, your program crashes (because the Matrix id was
  23. >moved out from under the Matrix mouseDown: routine).
  24. >
  25. >OK, another option is to do [browser reloadColumn:0].  This _works_,
  26. >but not all that well.  What happens is that I get the output:
  27. >
  28. >Assertion failed: You removed a View from the View hierarchy that
  29. >had been lockFocus'ed
  30. >
  31. >which isn't quite what I wanted, either.  The solution that I've
  32. >used is to schedule a delayed method invocation via
  33. >perform:with:afterDelay:cancelPrevious:.  This works, but does have
  34. >other drawbacks.  Anyone have a better idea?
  35. >
  36. >Thanks,
  37. >--
  38. >scott hess <shess@ssesco.com>  <Who's now in a programming Berserker-frenzy>
  39. >12901 Upton Avenue South, #326  Burnsville, MN 55337 (612) 895-1208 Anytime!
  40. ><I want to become so famous that people buy tapes of me reading source code>
  41.  
  42. Try using perform:with:afterDelay:cancelPrevious: to send the message
  43. to the browser.  If you use a delay of 1, it will simply place the message
  44. on the application's event queue, thus allowing the current browser action
  45. to finish properly.
  46.  
  47. -Brian
  48.  
  49.  
  50. -- 
  51. Brian Cuthie
  52. Systemix Software, Inc.
  53. brian@systemix.com
  54.