Thanks everyone, I now have two working controls on my interactive graph.
The direct assignment to my parameters from the id did it (along with some
punctuation corrections)

I noticed that when I manually enter the set bparm in the GRAPH script, that
it disappears from the script when I close the Design window. What am I
doing wrong?

I thought that the pas command put a border around the isigraph but it
doesn't seem to. Can I add one? I would ultimately like to add axis tick
marks but I don't know if this is possible.

Finally, is there any way to change the 0, 0 origin to be at the bottom left
rather than top left?

Again, thanks all for getting me this far.

Bob

---------------------------------------------------------------------------

GRAPH   =: 0 : 0
pc graph;pn "Graph Generator";
menupop "File";
menu new "&New" "" "" "";
menu open "&Open" "" "" "";
menusep;
menu exit "&Exit" "" "" "";
menupopz;
xywh 12 3 44 12;cc ok button;cn "OK";
xywh 265 2 44 12;cc cancel button;cn "Cancel";
xywh 15 256 35 11;cc avalue static ss_center;
xywh 21 23 281 221;cc chart isigraph ws_border;
xywh 63 255 177 11;cc aparm scrollbar;
xywh 63 272 177 11;cc bparm scrollbar;
xywh 15 271 33 12;cc bvalue static ss_center;
set aparm 100 150 200 5;
set bparm 100 150 200 5;
pas 6 6;
rem form end;
)

graph_setup =: 3 : 0
wd GRAPH
a=: 4.33
b=: 0.00033
charthandle =: wd 'qhwndc chart'
require 'gl2'
coinsert 'jgl2'
wd 'pshow;'
)

graph_close=: 3 : 0
wd'pclose'
)

graph_cancel_button=: 3 : 0
graph_close''
)

graph_ok_button=: 3 : 0
wdinfo 'OK button pressed'
)

graph_chart_char=: 3 : 0
glsel charthandle
glclear''
glrgb 255 0 0
glpen 2, PS_DASH
gllines mat%10
glpaint''
)

graph_aparm_button =: 3 : 0
a =: 5 *  ((". aparm)-100)%(200 - 100)
wd 'set avalue *','A = ',": a
ssb=: ((i. 20)*500)%2
rec=: a*ssb*^-b*ssb
mat=: ,ssb,.rec
graph_chart_char''
)

graph_bparm_button =: 3 : 0
b =:  0.0001 +(0.001 - 0.0001)*((". bparm)-100)%(200 - 100)
wd 'set bvalue *','B = ',": b
ssb=: ((i. 20)*500)%2
rec=: a*ssb*^-b*ssb
mat=: ,ssb,.rec
graph_chart_char''
)


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Iverson
Sent: March 11, 2008 3:02 PM
To: Programming forum
Subject: Re: [Jprogramming] Forms and Plots again

wd'q' should never be used (except for the use in wdhandler). wd'qd' is also

very rarely required. In an event wd'qd' just returns all the info that 
wdhandler has already set for you. The only use of wd'qd' would be to get 
info from a form other than the one with the event. And even there it would 
generally be better to have that info collected and saved in events on that 
form.

----- Original Message ----- 
From: "bill lam" <[EMAIL PROTECTED]>
To: "Programming forum" <[email protected]>
Sent: Tuesday, March 11, 2008 11:16 AM
Subject: Re: [Jprogramming] Forms and Plots again


> Just as Eric said, aparm has already set for you by wdhandler. And because

> wd'q' for that event has already been consumed by wdhandler. When you call

> wd'q' again and because there is no pending event therefore it raise an 
> error. However if you are interested in what the event data were, you may 
> still get it by wd'qd', eg.
>
> graph_aparm_button =: 3 : 0
> 1!:2&2 wd'qd'
> a=. ". aparm     NB. aparm is a string
> wd 'set values *','A = ',": a+0.25
> ....
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm 
----------------------------------------------------------------------
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