Difference: 520DragDrop (3 vs. 4)

Revision 42012-07-13 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPX520Features"

Drag & Drop Support

Line: 10 to 10
 You can now define certain Widget types (Buttons, Labels, others?) as targets of a drag & drop operation. This means the user can drag a file or other object to an Appx Widget & drop it.

Creating Drop Target

Changed:
<
<
Define a field on your image, then use the GUI Attributes to set the Control type to 'BUTTON'. Fill in the other attributes as desired (including which Option to fire), and at the end of the Tooltip, add the string @SDND=dir or @SDND=file. The 'dir' option will allow the user to drop a file or directory. If they drop a directory, Appx will recursively populate the --- DROP* files with all the files in that directory. If they drop a file, it will populate --- DROP* with just that file's info. Note that Email messages and attachments in Emails can also be dropped.

The @SDND technique will be replaced with Widget attributes in the final release.

>
>
Define a field on your image, then use the GUI Attributes to set a Control type, such as BUTTON, LABEL, etc, depending on your requirements. In Pre-Display, set --- WIDGET DROP TARGET to "Y" and set --- WIDGET FI CHOOSE MODE to one of the following:
  • ANY. Accepts a file, folder, or Email message/Attachment.
  • FILE. Accepts files only.
  • FOLDER. Accepts Folder names only
  • TREE. Same as ANY, except if the user drops a folder name, the folder will be parsed and all file names will be returned in the DROPINFO/DROPPROP files.
 

Drop Target at Runtime

Changed:
<
<
When the user drops an object (file/folder/email message/etc) on the drop target, Appx will populate 2 files and then fire the specified --- OPTION. The files are: --- DROPINFO which will contain one record for every object dropped and --- DROPPROP which will contain multiple records for each object dropped. Both of these files are keyed by the --- WIDGET IMAGE KEY, so if you have more than one drop target on your image, you can differeniate them. Alternatively, you can have the different drop targets fire different Option Numbers.
>
>
When the user drops an object (file/folder/email message/etc) on the drop target, Appx will populate 2 files and then set --- OPTION to <DROP/OPTION DROP/or something> (numeric value 335). The files are: --- DROPINFO which will contain one record for every object dropped and --- DROPPROP which will contain multiple records for each object dropped. Both of these files are keyed by the --- WIDGET IMAGE KEY, so if you have more than one drop target on your image, you can differentiate them.
  The --- DROPINFO PATHNAME contains the full path to the object the user dropped. The --- DROPPROP file is a child file of --- DROPINFO and contains multiple records for each object. The specific data varies depending on the type of object dropped. The --- DROPPROP KEYWORD identifies a specific property, and --- DROPPROP VALUE contains the value of that property.
Line: 40 to 42
  Note that these keywords vary depending on the user's desktop language.
Changed:
<
<

DROPINFO PATHNAME would contain the path to open and read the dropped item. You could also use this to open the file via .CLIENT LOAD URL:
>
>
DROPINFO PATHNAME would contain the path to open and read the dropped item. You could also use this to open the file via .CLIENT LOAD URL:
 
      SET      --- TEMP 512                   =      "
      APPEND   --- TEMP 512                   0  --- DROPINFO PATHNAME

Line: 52 to 54
 We enclose the name in quotes in case it contains a space.

Note that these files are cleared every time the image is displayed to the user. If you do not process or save the information each time, the previous data will be lost.

Added:
>
>
Email messages and attachments are copied to the location specified by 'dropCachePath', and then that path is returned to your program. 'dropCachePath' defaults to $(cachePath)\Drop.
 

Comments:

Read what other users have said about this page or add your own comments.

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback