---Brian Schott wrote:
>         Your suggestion is very helpful. I get the same
> result without the left hand argument in this next command.
> That is, your trick of viewing CELLDATA_25_ , for example,
> still works.
Yes the left argument is optional. However the grid will not be editable 
without it. <http://www.jsoftware.com/jwiki/Grid/Verb>

> (,:'CELLEDIT';1) grid i.4 5  NB. Creates an editable grid
>
>          I also do not see how your left argument is used by
> the verb grid because it does not seem to make sense to me
> looking at the definitions of grid and gridp_jzgrid_ . Could
> you clarify, please?
>
>    grid
> 3 : 0
> gridp_jzgrid_ y
> :
> (x;coname'') gridp_jzgrid_ y
> )
>    gridp_jzgrid_
> 3 : 0
> '' gridp y
> :
> a=. conew 'jzgrid'
> x gridpshow__a y
> )
>
By my reading the left argument of grid is not used by those two verbs (apart 
from being passed on). It is passed to gridpshow (along with the locale name). 
The verb gridpshow uses the left argument to grid to override the default 
options for the grid.

   gridpshow_jzgrid_
4 : 0
CELLDATA=: y
cube=. 2 < #$CELLDATA
defs=. towords gridpdefs x
wd GRIDP
destroy=: gridpdestroy
formx=. 0 ". wd 'qformx'
wh=. _2 {. getxywhx''
grid=: '' conew 'jzgrid'
show__grid defs
twh=. MinGrid >. readsize__grid wh
del=. 0 <. twh - wh
if. -. IFJAVA do.
  wd 'setxywhx grid 0 0 ',":wh + del
end.
wd 'pmovex ',":formx + 0 0,0 <. del+1+5*IFJAVA
wd 'pshow;'
)

There are some nice simple but interesting examples of customizing the grid at
<http://www.jsoftware.com/jwiki/Grid/Class>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to