Chapter Contents


SAS/AF Software: Class Dictionary

Using the Drag and Drop Component

All drag and drop methods contain signatures that accept an object as their only argument. This object is an instance of the Drag and Drop Component, a container for the standard drag and drop information that is passed between a drag site and a drop site. The information is stored in the following attributes of the Drag and Drop component:

is the name of the attribute that is passed from the drag site to the drop site.

is the value of the attribute that is passed from the drag site. This attribute is a complex attribute whose type is sashelp.classes.type.class, which contains the following attributes:
type represents the type of the attribute value (Character, Numeric, List, Object). Based on the value of type, you can query the appropriate "value" attribute.
characterValue stores the character value if type is "Character."
listValue stores the SCL list if type is "List."
numericValue stores the numeric value if type is "Numeric."
objectValue stores the object identifier if type is "Object."
For example, your method override could contain code as follows:
drop: public method
   if dndObj.attributeValue.type = 'Character' then
         /* Retrieve dndObj.attributeValue.characterValue, */
         /* then add any other code                        */
   else if dndObj.attributeValue.type = 'Numeric' then
         /* and so forth... */

is a character attribute that you can optionally set to indicate whether a drop can successfully occur. For example, you can perform validation in an override of the _validateDropData method, and you can cancel the drop action by setting this attribute to "No". You can also query this value in an override of the _completeDrag method to verify whether the drop will actually occur before performing some action on the drag site.

is the selected drag operation; corresponds to one of the operations specified in the dragOperations attribute that is set on the drag site.

is the form of the data that is passed between sites; corresponds to the particular list item in the dragInfo attribute that is set on the drag site.

is the object ID of the drag site.

indicates whether the drag started inside or outside of the current frame.

specifies the x location of the drag site or drop site.

specifies the y location of the drag site or drop site.

For components that are based on the SCOM architecture, the data specified in the data representation (such as characterData or EXPLORER_MEMBER_NAME) is stored in the attributeValue complex attribute of the Drag and Drop component. If one item is dragged, then the data is stored in the characterValue attribute of the attributeValue object. If two or more items are dragged, then the data is stored in the listValue attribute as separate character items.

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.