[clean-list] Drag and Drop with the ObjectIO1.2

Diederik van Arkel diederik@cs.kun.nl
Thu, 10 May 2001 11:37:20 +0200


Van: "Fabien Todescato" <f.todescato@larisys.fr>

> Dear Cleaners,
>
> And ObjectIO1.2 library practitioners, does anyone one of you know how to
> support darg and drop of files into an application's window, as the Clean
> IDE 2.0 does ?
>

Yes :-),

you need to add the 'ProcessOpenFiles' attribute to your initial process
attributes.
This expects a ProcessOpenFilesFunction as argument. This function receives
a list
of file-names and a process state and should return a new process state.
These are
all defined in StdIOCommon.

:: ProcessOpenFilesFunction st
 :== [String]          // The filenames to open
  -> st -> st

I seem to remember that if you launch your application by dropping a file on
it then
you receive this file-name on the commandline instead of via the Process
attribute.
To retrieve these argumments use Ronnie's ArgEnv library and remember to
convert
the file-path to Windows LongPathName convention if you intend to display it
some-
where. I can send you the code for this if you need it.

Regards,

Diederik van Arkel