Drag 'n Drop on Windows and Mac: 2 different objects?

Questions, tips and tricks and techniques for scripting in Servoy

Drag 'n Drop on Windows and Mac: 2 different objects?

Postby cl@muc » Tue Jul 10, 2012 10:58 pm

Hello,

when I drop a file from e.g. the Desktop on a Servoy form, the event.dataMimeType (in the onDrop(event) method) is 'application/x-java-file-list' on Windows. On Mac event.dataMimeType is
'application/x-java-url'.
This results in two different objects. Is this a bug or feature?

Thanks in advance.
Christoph
Christoph Langheld
http://www.project-print.de
cl@muc
 
Posts: 11
Joined: Thu Sep 28, 2006 9:55 pm
Location: Munich

Re: Drag 'n Drop on Windows and Mac: 2 different objects?

Postby ptalbot » Tue Jul 10, 2012 11:23 pm

Definitely a feature! ;)
You can have a look at the DnDFile bean on ServoyForge and see how I deal with it: https://www.servoyforge.net/projects/dndfile
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC


Return to Methods

Who is online

Users browsing this forum: No registered users and 6 guests