Back in February when I was first finding my way around the J IDE, I
asked whether it was possible to open multiple files at once from the
File > Recent form
(http://www.jsoftware.com/pipermail/general/2007-February/029058.html) .
At the time I was puzzled as to why it wasn't possible, but decided
there was probably a good reason (and as a result was prompted to come
to terms with the Project Manager - a definite positive!).
Now, a few months later, I decided to see if I could make it happen and
came up with the following solution that seems to work.  Is there any
reason similar changes shouldn't be made to jijs.ijs in the standard
library? If so, File > Recent in the Project Manager should also be
updated for consistency.

The changes I made to the jijs.ijs script were:
A) adding the Class style "lbs_extendedsel" to the listbox on the
JRECENT form (line 718)
B) changing the handler for "jrecent_open_button" to box each selected
file and open them using open_j_  (lines 746 & 748).
 
JRECENT=: 0 : 0
pc jrecent;pn "Recent Scripts";
xywh 3 3 175 130;cc lb listbox ws_vscroll lbs_extendedsel rightmove
bottommove;
xywh 182 4 52 11;cc open button bs_defpushbutton leftmove rightmove;cn
"&Open";
xywh 182 17 52 11;cc view button leftmove rightmove;cn "&View";
xywh 182 30 52 11;cc run button leftmove rightmove;cn "&Run";
xywh 182 43 52 11;cc rund button leftmove rightmove;cn "Run &Display";
pas 3 3;pcenter;
rem form end;
)

NB. The two original lines have been appended as comments after their
replacements
jrecent_open_button=: 3 : 0
if. #lb do.
  lb=. jpath each LF cutopen lb    NB. lb=. jpath lb
  if. 0 = ifshiftkey'' do. jrecent_close'' end.
  open_j_ lb                       NB. runimmx0_jijs_ 'smopen_jijs_
''',lb,''''
end.
) 


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to