Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Chapter 11 - Miscellaneous / Reference
Functions and Methods / Views


ViewAddDragInfoScript

view:ViewAddDragInfoScript(dragInfo)

Called to retrieve data if the user hits the global command keys, and your view has a hilitedData slot set to true.

dragInfo
An array of frames. You should add a frame to this array if you have something to cut or copy. Your frame should have the following slots:

types An array of symbols of the types to which an item can be converted.

view A view object type if the dragged item is a view with a symbol type of 'paragraph, 'polygon, 'picture, and so on.

dragRef Any value that will be passed to other methods.

label An optional string used when the drop is to the clipboard; it is used as the clipboard label. If this slot is missing and the item has a 'text type, the text data is used as the label; otherwise a default label is used.

minDragDistance An integer, the minimum distance in pixels that the user must drag the object before it moves. The default is 4.

return value
Return true if you have added an element to dragInfo; that is, something was cut or copied. Return nil otherwise.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help