If you code is gui event driven, you can add a button for interrupt, I guess
if timer event is handled, gui events will also be handled. (untest).

Вск, 10 Апр 2011, Ian Clark писал(а):
> Thanks Raul, and Bill.
> 
> I have to allow full use of the session, including causing errors, and
> still have the duty cycle keep running. So intercepting the J prompt
> on error (whether or not triggered by yellow J) may be hard to get
> working properly.
> 
> But the duty cycle already does so many checks that one more doesn't
> matter, and it turns out it's not a costly one. It simply checks the
> directory timestamp of the jbreak file. So I think I've cracked it.
> 
> I've posted the technique that works for me:
>    http://www.jsoftware.com/jwiki/IanClark/YellowJ
> 
> A simpler example might have been possible, but I've cut-down my
> operational code to make a demo. There's a number of things there of
> general interest, though maybe mostly to novices.
> 
> Ian
> 
> 
> On Sun, Apr 10, 2011 at 12:36 AM, bill lam <[email protected]> wrote:
> > The name of break file is pid of J process, you can acheive the same effect
> > of clicking the yellow icon by sending an int signal to J, eg.
> > kill -2 18887
> >
> > assuming J has the chance to process that signal. What J saw is an execution
> > error which can be trapped by try. catch., eg
> >
> > t1=: 3 : 0
> > try.
> > while. do. a=. 1 end.
> > catch.
> > smoutput 'break'
> > end.
> > ''
> > )
> >
> >
> > Сбт, 09 Апр 2011, Ian Clark писал(а):
> >> Cunning! The J prompt. Of course...
> >>
> >> I'm going to poll the jbreak file in my duty-cycle first. If the
> >> overhead is excessive, I'll try seeding immex instead.
> >>
> >> On Sat, Apr 9, 2011 at 6:54 PM, Raul Miller <[email protected]> wrote:
> >> > On Sat, Apr 9, 2011 at 1:48 PM, Ian Clark <[email protected]> wrote:
> >> >> Sorry, I don't see how immex helps me detect jbreak...?
> >> >
> >> > Immex runs right before J prompts.
> >> >
> >> > J prompts when your routine ends, or from jbreak.
> >> >
> >> > --
> >> > Raul
> >> >
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >
> > --
> > regards,
> > ====================================================
> > GPG key 1024D/4434BAB3 2008-08-24
> > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to