Use the dragdata string to pass whatever data is needed to carry out the application functionality that executes when the user drops on a target object. For simple applications, the dragdata string could be the name of the source ESL object. For more advanced applications, it could be a string or identifier that uniquely identifies the object being dragged. Dragdata strings can be as large as any ESL string: however, for optimal performance, they should be kept under approximately 4,000 bytes.
Some applications might have drag operations that either create new objects or cause processing to be done on existing objects. Printer, outbox, and trash can icons are examples of common drag targets that cause processing to be done on the dragged object. Template icons are icons used to create new objects – dragging from a template loan application icon to an empty window might create a new loan application, assign an application number, and open a dialog box so that a user can enter details of the loan application.
For drag operations that create new objects, the dragtype string could be the name of the application object concatenated with the word "New." For the loan application example, the dragtype string might be "NewLoanApplication". The dragdata for these operations can often be set to "", unless there is some particular data relevant to the creation operation.