nw = new window("graphs", vlb = v list box());
dirname = "jpegs";
set default directory(dirname);
foreach({jpeg}, files in directory(dirname),
img = new image(jpeg);
msg = eval insert("\!"^jpeg^\!"");
h = graphbox(
<
The above gives me
3 graphboxes
with three correctly rendered images,
but StatusMsg always sends "Spongebob.jpg". (Without the evalinsert(), just sending jpeg to StatusMsg, it throws an error.)
I want StatusMsg to give me the name of the image whose graphbox I clicked on.
Basically, I can kinda sorta imagine two routes:
1. Eval and related functions? I still haven't dug into that side of JSL very deeply.
2. Xpath? Maybe log the image name in a List; index will correspond with the frame box number.