The glclear domain is most likely because the default target of the isigraph
g in parent abc has been lost. In general drawing commands not in a paint
event should explicitly select the parent and child. That is:

   wd'psel abc'
   glsel'g'
   glclear''
   gllines 50?100
   glpaint''

gllines is drawing connected lines and this may not be what you want. In
that case you need to do a glline for each line (apply glline to a 4 col
matrix).

With luck others will have ideas on gd...

On Tue, Jun 29, 2010 at 2:45 PM, Raul Miller <[email protected]> wrote:

> On Tue, Jun 29, 2010 at 2:26 PM, Eric Iverson <[email protected]>
> wrote:
> > Following shows a way with isigraph and gl2:
> >
> > *** script
> >
> > load'gl2'
> > coinsert'jgl2'
> >
> > ABC=: 0 : 0
> > pc abc;
> > xywh 0 0 184 173;cc g isigraph rightmove bottommove;
> > pas 0 0;
> > rem form end;
> > )
> >
> > abc_run=: 3 : 0
> > wd ABC
> > wd 'pshow;'
> > )
> >
> > abc_g_paint=: 3 : 0
> > gllines 50?glqwh''
> > )
> > NB. paint 23 random lines - resize paints new ones
> > NB.    abc_run''
>
> abc_run works, with the above script.
>
> > To update from jijx can:
> >   glclear''
> >   gllines 20?100
> >   glpaint''
>
> I got a domain error from glclear.
>
> That said, I was hoping for something short, perhaps like:
>   require'graph'
>   gdopen''
>   gdlines 20?100
>   gdshow''
>
> However, that just gives me a blank window, and
> the documentation at http://www.jsoftware.com/help/user/script_graph.htm
> does not suggest what I might be doing wrong.  (Also, gdlines seems
> very slow when given a large amount of data.)
>
> --
>  Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to