Re: Drop of a file on the App icon

Jean-Luc Arnaud <jean-luc-E/[email protected]> Tue, 3 Apr 2018 10:17:22 +0200
Newsgroups gmane.comp.lang.realbasic.user
Organization Centre Direct du Multimédia
Message-ID <[email protected]>
Many thanks for explanation, Eduardo.

Jean-Luc Arnaud

Le 31/03/2018 à 23:31, Eduardo Gutierrez de O a écrit :
> Essentially, the routine is the same as "File" -> "Open".
>
> In theory the icon will only accept (in Mac it would highlight) for extensions it understands. But you need to make sure to check for validity nonetheless because on one side the extension might not be true and in the other there are ways to force an app to open "any" file (cmd-drop on Mac, for example).
>
> I check for the file and depending on the type I assume what the action probably is and process it accordingly. I have these mapped to specific routines also used in, menus, when I open from the services menu and when I copy and paste "files".
>
> Eduo
>
>> On 27 Mar 2018, at 15:40, Jean-Luc Arnaud <jean-luc-E/[email protected]> wrote:
>>
>> Hi all,
>>
>> I'd like to know if it's possible to code so that a file drop on the App icon launches the App and opens the file.
>>
>> Ideally for Mac and Windows.
>>
>> Many thanks.
>>
>> -- 
>> Jean-Luc Arnaud
>>