Le 28/11/2011 10:17, Maria a écrit :
> Hi!
>
> I was trying drag&drop posibilities in Gambas and I was wondering if you 
> could help me with a problem I found.
>
> I create a button with the DROP property TRUE. Then I write this:
>
> PUBLIC SUB button_Drop()
>
> DIM a AS String
>
>    a = Drag.Paste()
>    a = RTrim(a)
>    EXEC ["gedit", a]
> END
>
>
> This works.  Drag.Paste get the file I droped, but in an horrible html 
> format, with %20 in spaces and other
> characters like ñ áéíóú, etc... AND starting with "file://"
> Gedit works because untherstand this format, butmust commands do not 
> understand this format. AND it finishes with a strange character that I have 
> to cut with RTrim otherwise I would not work.
>
> Now the questions:
>
> How to get a lot of files droped into the button?
> How to get real and good path for all applications can untherstand it?
>

You must specify the paste format: Drag.Paste("text/uri-list")

Then you will get a list of uri separated by newline characters.

Then search the internet to find how to convert a "file://" uri into a 
standard file path.

Regards,

-- 
Benoît Minisini

------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to