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
http://www.servoy-stuff.net
https://www.servoyforge.net
--------------------------------------------
Servoy 5.2.16 / 6.0.9 / 6.1.6 / 7.3.1
All OSes / Java 5 & 6 & 7
User avatar
ptalbot
 
Posts: 1616
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 1 guest

cron