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 (February 2001, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 5 Feb 2001 14:03:00 -0500
Reply-To:     Richard DeVenezia <radevenz@IX.NETCOM.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Richard DeVenezia <radevenz@IX.NETCOM.COM>
Organization: MindSpring Enterprises
Subject:      Re: SAS/AF: Using the SAS Session Event Component

The SAS Event Component is for when your application needs to be notified of a session event, i.e. something the user does or another application does that affects the SAS session (such as a libname is assigned, catalog entry deleted, etc...)

To assign a libname programmatically with SAS/AF use the LIBNAME() function. Use the SAS Event Component if your frame or class needs to know that a libname was assigned (independent of itself)

The Example as stated in online help is incorrect.

The EventGenerator (called Sender in help file) should be Sessionevent1 not _SESSION_.

The automatically created new methods (onLibraryAssigned and onLibraryDeassigned) have the wrong signature. Add one character argument to each method.

The help states " - library assigned Character string containing libname, engine, and path of newly created library, such as 'MYLIB V7 d:\mydir' - library deassigned Character string containing libname of deassigned library, such as 'MYLIB' "

The value of the argument passed to the event handling methods are the character strings described above. Note: You can't simply scan out the path of the newly created library (if the path contains spaces scan will truncate the actual path, the path is from just past the engine to the end of the string)

Since LibraryList1 (a model) was dropped onto Listbox1 (a viewer) there is a model/viewer connection between the two components, when the model receives a 'contents updated' event, the model/view connection automatically forwards this information to the viewer which then responds by redisplaying the list of values in the model.

Now, the interesting thing is that the example wants you to modify the LibraryList1 items list and fire a 'contents updated' against itself. You can't, first because items has the list attribute NOUPDATE (and if you try to enable updates [ rc=setlattr(_self_.items,'UPDATE') ], it won't let you because you are missing a password)

There may be a way to cause the LibraryList to rebuild the list of libraries, but there is no obvious method or attribute to do so.

Your best resolution will come from a call to Tech Support.

-- Richard DeVenezia - SAS Macros and AF Tools http://www.devenezia.com

"Pierre Felx" <pierre.felx@STATCAN.CA> wrote in message news:3A66CAF3B5D3D4119AFD00508BC286AD010B2B39@msxa4.statcan.ca... > I have been trying to assign a library dynamically according to the example > listed in the help file "Using the SAS Session Event Component". It does > not appear to be working. The only thing I have not done is set > SENDER=_SESSION_ as I am not sure where to set this. Is it possible that > this example doesn't work, or am I just missing something? > > > > > Pierre Felx > > Methodologist > > pierre.felx@statcan.ca <mailto:pierre.felx@statcan.ca> > > 11I - R.H. Coats > > Tunney's Pasture > > Ottawa, Ontario > > K1A 0T6 > > > > Phone: (613) 951 0075 > > Fax: (613) 951 1462 > >


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