Focus ring bug

When dragging objects to a canvas we can force the focus ring to show up when entering in the drop zone and disappear when dragged off. Everything works fine until you decide to make it with files. It just works ONCE. After dropping a file, the canvas.setfocus() or enabling the focus ring if it’s already focused stops drawing the focus ring.

Check this behavior in this demo: https://drive.google.com/file/d/0B6w6JZen_vW2S2Iza2VwMWFfVjA/edit?usp=sharing

Should I need to open a case?

On OSX there is no focus ring while dropping file.

Check the code. I am not expecting OSX to handle the focus, I handled the setfocus() myself, multi-platform.
Works every time for objects, but just one time for files, and then something gets bugged internally to Xojo, and the focus stop to work, even for objects.

[quote=113891:@Rick Araujo]When dragging objects to a canvas we can force the focus ring to show up when entering in the drop zone and disappear when dragged off. Everything works fine until you decide to make it with files. It just works ONCE. After dropping a file, the canvas.setfocus() or enabling the focus ring if it’s already focused stops drawing the focus ring.

Check this behavior in this demo: https://drive.google.com/file/d/0B6w6JZen_vW2S2Iza2VwMWFfVjA/edit?usp=sharing

Should I need to open a case?[/quote]

From the tests I did before I posted a workaround in the thread started by Emile (who disappeared since), https://forum.xojo.com/14070-set-the-focus-ring-around-a-canvas-at-drag-n-drop-time I think it is indeed a bug. Could be a Cocoa bug more than a Xojo bug. But at this stage, not easy to know.

Open a case with a test project and the best description you can.

feedback://showreport?report_id=34553

Wrong.

On Carbon there is.

On Cocoa, there is not, but it is possible to fake it but I was not able to do it.

On Windows, it was possible, I do not checked recently (with XP).

On Linux…

But OS X no longer means Carbon.

For you, me and some others, but not for the silent majority (remember some are still using pre 10.7 OS…) ;-:slight_smile:

[quote=114064:@Emile Schwarz]Wrong.

On Carbon there is.

On Cocoa, there is not, but it is possible to fake it but I was not able to do it.

On Windows, it was possible, I do not checked recently (with XP).

On Linux…[/quote]

That is exactly why I posted a way to do it but obviously you did not read. :frowning:

I do save it, but after sending this reply.

Note that I will read it later today (back home).

Thanks.

PS: I do not found “my conversation” (thanks for the link), and read this one first.
This explains that.

You might as well write Carbon apps for that bunch which you’ve already said works fine.
Carbon post 10.7 won’t get any fixes / updates from us or Apple.
And Cocoa for pre-10.7 requires using an older version of Xojo which doesn’t have Cocoa in nearly as good a state as now.