Ric,

        Thank you again for your most informative response.
I had no idea that the left argument enabled cell editting
and now was pleased to "discover" that such a simple
one-line entry could permit cell editting by just clicking
on a cell and then editting it. I assumed a more complete
script like the demo's you pointed to later was required
before cell editting could be done.

        The jwiki pages and demos you give are most
valuable. I noticed in the demos that I was unable to close
the grids with my escape key.  So I experimented a little
and added a line to the griddemo2 and griddemo3 as follows.
This is handy for folks who use keys when possible to avoid
mouse clicks.

griddemo2:
gdemo_cancel=: destroy

griddemo3:
gmain_cancel=: destroy

        I wish J _close also honored the keychord for _close
like the J IDE does, but when I include lines like the
following I cannot close a control with the system keychord.
Is this a Mac feature or do other platforms work similarly?
If so, perhaps enabling this could be added in future J
releases.

gdemo_close=: destroy
gmain_close=: destroy


On Mon, 2 Jun 2008, Sherlock, Ric wrote:


+ Yes the left argument is optional. However the grid will
+ not be editable without it.
+ <http://www.jsoftware.com/jwiki/Grid/Verb>


+ 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