I'm afaid I don't have the time to help in  detail now. You are perhaps
biting off too much right now. It is probably a mistake to copy all that
stuff from jijx to jijxipad without really understanding the jijx
framework. Why not focus for now on the smaller task of just adding a
labadvance button to jijxipad. For the experiment us jijx to open a lab.
Then you have the well defined and limited task of adding a button to
jijxipad that calls labnext when called.

On Fri, Dec 9, 2011 at 9:55 AM, Brian Schott <schott.br...@gmail.com> wrote:

> Eric,
>
> I have successfully only added the button "L" in jijxipad (in line 24
> in the diff). When I click that new button, all that apparently
> happens is the line "</div>". Other than that I have mostly just
> copied from jijx into jijxipad definitions which relate to labs,
> including the verb "labopen". Can you look at the diff below and
> suggest how I can proceed, please?
>
> [9:42am brian~]% diff /Users/brian/j701/addons/ide/jhs/jijxipad.ijs
> /Users/brian/j701/addons/ide/jhs/jijxipad.ijs.orig
> 24d23
> < 'labs' jhb '&nbsp;L&nbsp;'
> 28,88d26
> < ev_labs_click=: 3 : 0
> < 'labsdlg'   jhdivadlg''
> <  'labrun'   jhb'run'
> <  labsel''
> <  'labsclose'jhb'X'
> < '</div>'
> < )
> <
> < labopen=: 3 : 0
> < require__'~addons/labs/labs/lab.ijs'
> < smselout_jijs_=: smfocus_jijs_=: [ NB.! allow introcourse to run
> < labinit_jlab_ y{LABFILES
> < )
> <
> < getlabs=: 3 : 0
> < LABTITLES=: LABCATS=: LABFILES=: ''
> < d=. dirpath t=. jpath'~addons/labs/labs'
> < try.
> <  for_p. d do.
> <   for_q. 1 dir '/*.ijt',~>p do.
> <   LABFILES=: LABFILES,q
> <   cat=. (>:#t)}.>q
> <   cat=. (cat i.'/'){.cat
> <   LABCATS=:  LABCATS,<cat
> <   title=. toJ fread q
> <   title=. (title i.LF){.title
> <   title=. (>:title i.'''')}.title
> <   title=. (title i:''''){.title
> <   LABTITLES=: LABTITLES,<cat,': ',title
> <   end.
> <  end.
> < catch.
> < end.
> < s=. /:LABTITLES
> < LABFILES=:  s{LABFILES
> < LABCATS=:   s{LABCATS
> < LABTITLES=: s{LABTITLES
> < )
> <
> < labsel=: 3 : 0
> < getlabs''
> < >(0~:#LABTITLES){'';'labsel'jhselect LABTITLES;1;0
> < )
> <
> < labopen=: 3 : 0
> < require__'~addons/labs/labs/lab.ijs'
> < smselout_jijs_=: smfocus_jijs_=: [ NB.! allow introcourse to run
> < labinit_jlab_ y{LABFILES
> < )
> <
> < ev_lab_click=: 3 : 'smoutput labmsg' NB. no labs to select
> <
> < ev_dot_ctrl   =: ev_advance_click
> < ev_advance_click=: 3 : 0
> < if. (<'jlab')e.conl 0 do.  labnext_jlab_'' else. smoutput 'No lab
> open. Do studio|labs...' end.
> < )
> <
> < ev_labrun_click=: 3 : 0
> < labopen ".getv'jsid'
> < )
> <
> 228,246d165
> < function ev_advance_click(){jdoajax([]);}
> <
> < function ev_lab_click()
> < {
> <  if(null==jbyid("labsel"))
> <   jdoajax([],"");
> <  else
> <  jdlgshow("labsdlg","labsel");
> < }
> <
> < function ev_labsclose_click(){jhide("labsdlg");ev_2_shortcut();}
> <
> < function ev_labrun_click()
> < {
> <  jhide("labsdlg");
> <  jform.jsid.value= jbyid("labsel").selectedIndex;
> <  jdoajax([],"");
> < }
> <
> [9:43am brian~]%
>
> On Wed, Dec 7, 2011 at 11:08 AM, Eric Iverson <eric.b.iver...@gmail.com>
> wrote:
> > For ipad labs I'd be inclined for now to forgo the gui complications.
> > Provide a verb that list all the labs in the jijx window with numbers.
> The
> > a labopen verb that opens a lab by number. I'd leave the advance button
> on
> > the screen all the time.
> >
> ----------------------------------------------------------------------
> 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