Thanks Devon, this is progress. Wd 'q' is supposed to give the position of
the scrollbar in pixels. What I need to do now is do a conversion between
the limits of the scrollbar (left & right in pixels) and the range of the
parameter 'a' that I want. So if I want the slider to go between values of
'a' from say 0 to 5, then I need to convert the position of the slider in
pixels (wd 'q') to be on this scale. I'll work on a bit more to see what I
can come with

Bob

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Devon McCormick
Sent: March 10, 2008 10:56 PM
To: Programming forum
Subject: Re: [Jprogramming] Forms and Plots again

That can't be right.  Changing the start of graph_aparm_button to

NB. a =: ". wd 'q'
nv=. |:wd'q'
a=. ".>(1{nv){~(0{nv)i.<'aparm'

(since I see no reason to make "a" global when it's only used locally)
gives me something that doesn't get an error but I still don't know what
it's supposed to do.

Hope this helps.


On 3/10/08, Devon McCormick <[EMAIL PROTECTED]> wrote:
>
> Maybe this is supposed to be something like
>    a=: ".&.>{."1 wd 'q'
> ?
>
> On 3/10/08, Devon McCormick <[EMAIL PROTECTED]> wrote:
> >
> > Bob -
> >
> > when I was able to re-produce your domain error on the "wd GRAPH" step,
> > I was about to apply wd to lines of GRAPH sequentially in order to
isolate
> > the error, when I noticed the lack of an ending ";" on the line "set
aparm
> > 100 150 200 5".  Putting this in got me past the domain error and at
least
> > puts something up.
> >
> > I now get a domain error in graph_aparm_button on the line: a=: ".wd'q'
> > Since I don't know what you're trying to do, that's as far as I can get
> > now.
> >
> > Regards,
> >
> > Devon
> >
> > On 3/10/08, Robert O'Boyle <[EMAIL PROTECTED]> wrote:
> > >
> > > I have made a bit of progress since my last e-mail with trying to
> > > develop an
> > > interactive plot using the Form Editor but am stalled on a domain
> > > error.
> > > According to the Window Controls in the User on-line documentation,
> > > 'set id
> > > a b c d' should allow me to set the left, middle and right positions
> > > of the
> > > scrollbar as well as the step size in pixels. I should then be able to
> > > retrieve the position of the scrollbar slider with wd 'q'. At least
> > > this is
> > > how I am interpreting it. I'm new to all this so I could have it wrong
> > > on a
> > > number of levels.
> > >
> > >
> > >
> > > My script is below. The domain error occurs with the set parameter in
> > > the
> > > GRAPH script. I can't see where the error is.
> > >
> > >
> > >
> > > Any help would be greatly appreciated
> > >
> > >
> > >
> > > 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 23 256 50 10;cc values static ss_center;
> > >
> > > xywh 21 23 281 221;cc chart isigraph ws_border;
> > >
> > > xywh 54 255 177 11;cc aparm scrollbar;
> > >
> > > set aparm 100 150 200 5
> > >
> > > pas 20 20;pcenter;
> > >
> > > rem form end;
> > >
> > > )
> > >
> > >
> > >
> > > graph_setup =: 3 : 0
> > >
> > > wd GRAPH
> > >
> > > 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 =: ". wd 'q'
> > >
> > > wd 'set values *','A = ',": a+0.25
> > >
> > > b=:       0.00033
> > >
> > > ssb=: ((i. 20)*500)%2
> > >
> > > rec=: a*ssb*^-b*ssb
> > >
> > > mat=: ,ssb,.rec
> > >
> > > graph_chart_char''
> > >
> > > )
> > >
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > >
> >
> >
> >
> > --
> > Devon McCormick, CFA
> > ^me^ at acm.
> > org is my
> > preferred e-mail
> >
>
>
>
> --
> Devon McCormick, CFA
> ^me^ at acm.
> org is my
> preferred e-mail
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
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