🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #249

Re: NXBrowser problem.

#249
From: Brian Cuthie
Date: Mon, 27 Jul 1992 02:18
42 lines
2218 bytes
In article <SCOTT.92Jul23004939@nic.gac.edu> scott@nic.gac.edu (Scott Hess) writes:
>I've a situation where I need the action method for an NXBrowser
>to modify the values in the browser.  Unfortunately, I've been
>having some problems.  [This is under NS2.1.]
>
>An obvious incantation to reload the browser would be to incant
>[browser loadColumnZero].  _But_, there's a problem here.  The
>action method will have been called from a Matrix in the browser
>- and loadColumnZero frees all of the columns and then recreates
>them!  So, when you return from the action method after doing a
>loadColumnZero, your program crashes (because the Matrix id was
>moved out from under the Matrix mouseDown: routine).
>
>OK, another option is to do [browser reloadColumn:0].  This _works_,
>but not all that well.  What happens is that I get the output:
>
>Assertion failed: You removed a View from the View hierarchy that
>had been lockFocus'ed
>
>which isn't quite what I wanted, either.  The solution that I've
>used is to schedule a delayed method invocation via
>perform:with:afterDelay:cancelPrevious:.  This works, but does have
>other drawbacks.  Anyone have a better idea?
>
>Thanks,
>--
>scott hess <shess@ssesco.com>  <Who's now in a programming Berserker-frenzy>
>12901 Upton Avenue South, #326  Burnsville, MN 55337 (612) 895-1208 Anytime!
><I want to become so famous that people buy tapes of me reading source code>

Try using perform:with:afterDelay:cancelPrevious: to send the message
to the browser.  If you use a delay of 1, it will simply place the message
on the application's event queue, thus allowing the current browser action
to finish properly.

-Brian


-- 
Brian Cuthie
Systemix Software, Inc.
brian@systemix.com
Technical Details
Message-ID: <1992Jul27.021852.17584@umbc3.umbc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!news.umbc.edu!umbc4.umbc.edu!brian
References: <SCOTT.92Jul23004939@nic.gac.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!news.umbc.edu!umbc4.umbc.edu!brian
From: brian@umbc4.umbc.edu (Brian Cuthie)
Subject: Re: NXBrowser problem.
Message-ID: <1992Jul27.021852.17584@umbc3.umbc.edu>
Sender: newspost@umbc3.umbc.edu (News posting account)
Organization: University of Maryland Baltimore Campus
References: <SCOTT.92Jul23004939@nic.gac.edu>
Date: Mon, 27 Jul 1992 02:18:52 GMT
Lines: 42