home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5192 < prev    next >
Encoding:
Internet Message Format  |  1992-07-23  |  1.7 KB

  1. Path: sparky!uunet!darwin.sura.net!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: NXBrowser problem.
  4. Message-ID: <SCOTT.92Jul23004939@nic.gac.edu>
  5. From: scott@nic.gac.edu (Scott Hess)
  6. Date: 23 Jul 92 00:49:39
  7. Distribution: world
  8. Organization: Gustavus Adolphus College
  9. Nntp-Posting-Host: nic.gac.edu
  10. Lines: 28
  11.  
  12. I've a situation where I need the action method for an NXBrowser
  13. to modify the values in the browser.  Unfortunately, I've been
  14. having some problems.  [This is under NS2.1.]
  15.  
  16. An obvious incantation to reload the browser would be to incant
  17. [browser loadColumnZero].  _But_, there's a problem here.  The
  18. action method will have been called from a Matrix in the browser
  19. - and loadColumnZero frees all of the columns and then recreates
  20. them!  So, when you return from the action method after doing a
  21. loadColumnZero, your program crashes (because the Matrix id was
  22. moved out from under the Matrix mouseDown: routine).
  23.  
  24. OK, another option is to do [browser reloadColumn:0].  This _works_,
  25. but not all that well.  What happens is that I get the output:
  26.  
  27. Assertion failed: You removed a View from the View hierarchy that
  28. had been lockFocus'ed
  29.  
  30. which isn't quite what I wanted, either.  The solution that I've
  31. used is to schedule a delayed method invocation via
  32. perform:with:afterDelay:cancelPrevious:.  This works, but does have
  33. other drawbacks.  Anyone have a better idea?
  34.  
  35. Thanks,
  36. --
  37. scott hess <shess@ssesco.com>  <Who's now in a programming Berserker-frenzy>
  38. 12901 Upton Avenue South, #326  Burnsville, MN 55337 (612) 895-1208 Anytime!
  39. <I want to become so famous that people buy tapes of me reading source code>
  40.