Thread View: comp.sys.next.programmer
2 messages
2 total messages
Started by Scott Hess
Thu, 23 Jul 1992 00:49
NXBrowser problem.
Author: Scott Hess
Date: Thu, 23 Jul 1992 00:49
Date: Thu, 23 Jul 1992 00:49
28 lines
1762 bytes
1762 bytes
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>
Re: NXBrowser problem.
Author: Brian Cuthie
Date: Mon, 27 Jul 1992 02:18
Date: Mon, 27 Jul 1992 02:18
42 lines
2218 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads