Date: Fri, 12 Nov 2004 12:40:56 -0600
Reply-To: "Dunn, Toby" <Toby.Dunn@TEA.STATE.TX.US>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Dunn, Toby" <Toby.Dunn@TEA.STATE.TX.US>
Subject: Re: SAS/AF: Create Widgets Programmatically
Content-Type: text/plain; charset="us-ascii"
I ran _NEO_ through the SAS v9 online docs and got 9 hits perhaps there
is something there that will help.
Toby
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Randy Herbison
Sent: Friday, November 12, 2004 12:38 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: SAS/AF: Create Widgets Programmatically
Matt,
Good question. I haven't found much in the OnlineDoc or SAS Help other
than bits and pieces as in the case of the _NEO_ operator. I developed
a V6 AF application years ago that used SCL to establish region
attachments, and if I remember correctly, I found an example in one of
the V6 AF hardcopy manuals. I haven't seen the V8 SAS/AF hardcopy
documentation, but I suspect it may be helpful.
Without access to better documentation, I would probably resort to trial
and error. The attributes specified in the _NEO_ example, to me, look
like V6 instance variable names (V6 used underscores more than V7-V9).
When I tried removing the underscores from the attribute names (to match
actual V8 attribute names) used in the _NEO_ example, the code didn't
work.
RandyHerbison@westat.com
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of m n
Sent: Friday, November 12, 2004 10:25 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: SAS/AF: Create Widgets Programmatically
Randy,
Thanks a lot for the information--I see similar code
in the doco for the _neo_ statement, which I was
overlooking in favor of the _new_ statement. However,
I can't find documentation that *explains* what's
happening here. Evidently, the attr list is being
passed to the _init() method. However, where is the documentation that
explains what that attr list should contain? In other words, what is
the structure / semantics of the required attr list, and where is it
documented?
Thanks!
Matt
--- Randy Herbison <RandyHerbison@westat.com> wrote:
> Matt,
>
> You can:
>
> 1. Use a _region_ list to store the region
> coordinates for the spinbox.
> 2. Insert the _region_ list into an attribute list.
> 3. Specify the attribute list as an argument to the
> _NEO_ operator.
>
> import sashelp.classes;
> dcl list attr={} region={};
> dcl spinbox_c myspin;
> dcl num rc;
>
> startcol=5;
> startrow=5;
>
> rc = setniteml(attr, region, '_region_');
> rc = setnitemn(region, startcol, 'ulx');
> rc = setnitemn(region, startrow, 'uly');
>
> myspin = _neo_ spinbox_c(attr);
>
> rc=dellist(attr,'y');
>
>
>
> RandyHerbison@westat.com
>
> -----Original Message-----
> From: SAS(r) Discussion
> [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of m n
> Sent: Thursday, November 11, 2004 12:24 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: SAS/AF: Create Widgets Programmatically
>
>
> Dear SAS-L,
>
> I know I can create a new widget object
> programmatically using the _new_ statement in SCL,
> as
> in:
>
> import sashelp.classes;
> dcl spinbox_c myspin = _new_ spinbox_c();
>
> Suppose the above code is in the handler for a push
> button, so that when that button is pressed, I want
> a
> new spin box to appear at a certain location in the
> frame. Instead, what happens is that I get a hand
> icon and a dotted box, asking me to place the spin
> box
> during run-time.
>
> After creating the spinbox object, I've set the
> position and size attributes, but that does not
> automatically place the object. Thus, my question
> is:
> how do I automatically "drop" the new object without
> the user needing to place it him/herself?
>
> The _refresh() and _update() methods have no effect.
>
> Thanks!
> Matt
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Check out the new Yahoo! Front Page.
> www.yahoo.com
>
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
|