Date: Fri, 1 Nov 2002 18:36:03 -0500
Reply-To: Randy Herbison <RandyHerbison@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Randy Herbison <RandyHerbison@WESTAT.COM>
Subject: Re: Referring to a Frame Object in SAS/AF
Content-Type: text/plain; charset="iso-8859-1"
Deborah,
To do this in SCL other than one of the checkbox methods, you'll need to
declare the pointer as a valid data type. It can be a generic OBJECT data
type or the class name of the referenced object. If you use the class name,
the complier can validate attributes and methods.
dcl object myWidget;
dcl sashelp.classes.Checkbox_c.class myWidget;
RandyHerbison@westat.com
-----Original Message-----
From: Kevin Myers [mailto:KevinMyers@AUSTIN.RR.COM]
Sent: Friday, November 01, 2002 5:45 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Referring to a Frame Object in SAS/AF
Within the SCL for a frame, there is not any generic name by which you can
reference an individual component of that frame. You could reference the
object by another variable that you create to point it's object ID, but you
would have to set that up yourself. If what you are trying to do is to
create some generic code that can be used on multiple widgets (e.g.
checkboxes), then you might consider starting the labeled section for each
widget with something like:
myWidget=myWidgetName;
Where myWidgetName is the specific object's name. Then you could refer to
myWidget throughout the rest of your code, and not have to use a different
name for each different checkbox. You could link to a labeled section of
code that would implement your common code for each widget as desired.
However, a better way to implement generic code for any type of object is in
many cases to develop a subclass. From within overriden methods for a given
subclass of objects, you CAN refer to the object itself via _self_.
Hope this helps.
s/KAM
----- Original Message -----
From: "Deborah Testa" <dtesta@SEVENOFNINESYSTEMS.COM>
Newsgroups: bit.listserv.sas-l
To: <SAS-L@LISTSERV.UGA.EDU>
Sent: Friday, November 01, 2002 3:52 PM
Subject: Referring to a Frame Object in SAS/AF
> If I have a checkbox on a frame and I want to refer to that object within
> it's own labelled section, is there a reference I can use other than the
> object's name? For example:
>
> Checkbox1:
>
> if ... then Checkbox1.selected = 'No';
>
> return;
>
> Is there a generic reference such as _self_ or something else that will
work
> in place of naming the object before the '.selected'? _self_ seems to
> refer to the frame rather than the object.
>
> Thanks,
>
> Deborah