LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 26 Aug 2008 14:04:17 -0400
Reply-To:     Randy Herbison <RandyHerbison@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Randy Herbison <RandyHerbison@WESTAT.COM>
Subject:      Re: SAS/AF: Event Handler to React to Select a Table Viewer
In-Reply-To:  <200808261559.m7QFemvm020302@malibu.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"

As an alternative to sub classing the table viewer class to override its _select() method, you can create a per instance method by overriding the method for an instance of the table viewer class (overriding the _objectLabel() method also works). Either way will allow you to detect a click on the table viewer control and respond with event processing, but per instance methods represent a non-object-oriented approach to programming.

-Randy

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Kevin Graham Sent: Tuesday, August 26, 2008 12:00 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: SAS/AF: Event Handler to React to Select a Table Viewer

SI only gave you half of the answer.

You can still detect a click on the Tableview, but you will need to code the class. You have to write some code, but you get absolute control over "if" and "when" you want to fire your own event in respose.

Keep in mind, when you have as sasdataset model attached, that object fires its _select method first.

class tableview1 extends sashelp.classes.tableviewer_c.class; public list row / (sendEvent='N'); public list column / (sendEvent='N');

_select: method / (state='o'); _super(); _getActiveCell(row, column);

call putlist(row); call putlist(column);

if getitemn(column) > 3 then _sendEvent('anyName');

_clearActiveCell(); endmethod; endclass;


Back to: Top of message | Previous page | Main SAS-L page