Paste in a File I/O dialog add the Clipboard contents to (my) ListBox: a solution

Sometimes ago, I was complaining about a (bad for me) bug: when you have a window (in that case with a ListBox) and you want to save its contents using Paste, the text in the Clipboard does not go into the File I/O dialog name field, but instead is added to the window (ListBox in this case).

I was getting data with Firefox (who have a nasty bug concerning Copy / Paste and I/O dialogs), it recalls me that bug.

I eeded a break and so I fired Xojo, loading the concerned project and tried two lines to squash the bug. I keed-p the first one. If the window does not have the focus, then I do not have to paste anything into the window ! Below is the code.

In FilePaste Menu Handler (just after my Dim block and before any other code):

// Anti-Paste in the ListBox instead of in a File I/O dialog field: If Self.Focus = Nil Then Return False

I hope this will help some of us.

BTW: you may close bug 36759.