[SOLVED] Drag.Paste("text/uri-list") problem.

Post your Gambas programming questions here.
User avatar
BruceSteers
Posts: 1579
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Drag.Paste("text/uri-list") problem.

Post by BruceSteers »

It is now fixed in gambas master...
https://gitlab.com/gambas/gambas/-/comm ... bc796d4acf

Well for the FromURL() function.
I'm not at home to test if it also fixed it for Drag.Paste() but if it uses FromURL() then it will be.

Thank you Benoit 8-)
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1579
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Drag.Paste("text/uri-list") problem.

Post by BruceSteers »

After examining Drag.class and gb.gui.base source files I can say it is not currently fixed for Drag.paste()

I've suggested a fix to Benoit.
I'm sure it will soon be squashed 😎
If at first you don't succeed , try doing something differently.
BruceS
vuott
Posts: 263
Joined: Wednesday 5th April 2017 6:07pm
Location: European Union

Re: Drag.Paste("text/uri-list") problem.

Post by vuott »

BruceSteers wrote: Wednesday 18th October 2023 8:49pm ...but if it uses FromURL() then...
Currently, by using "FromUrl()" function:
ListBox1.Add(Scan(FromUrl(Drag.Paste()), "*//*\r*")[1])
Europaeus sum !

Amare memorentes atque deflentes ad mortem silenter labimur.
keithflundole
Posts: 3
Joined: Saturday 14th October 2023 5:53am

Re: Drag.Paste("text/uri-list") problem.

Post by keithflundole »

> Benoit has accepted this is a bug and has a plan to fix it by making FromURL() and Drag.Paste() only translate + to a space after a '?' Char in a URL.

I compiled the latest Gambas.
And the problem was solved.

Thank you everyone.
User avatar
BruceSteers
Posts: 1579
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: [SOLVED] Drag.Paste("text/uri-list") problem.

Post by BruceSteers »

You're welcome 8-)

after fixing the interpreters FromURL() function Benoit then modified the Drag.Paste() uri-list function to use FromURL() and removed the code from gb.gui.base it used to use that was essentially the same as FromURL() anyway.

So both FromURL() and Drag.Paste() are fixed and gb.gui.base got a little lighter 😎

Just a note....
When something like this happens and a bug gets fixed remember it's only fixed in the latest gambas master.

If you need backward compatibility (if your software is public for others to use they may not have latest gambas) you'll still need a workaround like some of the ideas we provided.

If you know your software is only going to be used on machines that will have latest gambas then it's fine and that bug will never occur again.
If at first you don't succeed , try doing something differently.
BruceS
Post Reply