Lazarus

Programming => Widgetset => Cocoa => Topic started by: xinyiman on May 29, 2019, 02:02:20 pm

Title: Bug into bringtofront?
Post by: xinyiman on May 29, 2019, 02:02:20 pm
Hi guys, I wrote a small test to simulate the opening and closing of a frame in the four corners of the window. If I start with frame1_1.visible: = true
everything works fine. But if I leave with the
frame1_1.visible: = false
there is a problem in the bringtofront. Can anyone tell me why? Is it a bug or am I wrong?

Thank you
Title: Re: Bug into bringtofront?
Post by: xinyiman on May 29, 2019, 02:34:11 pm
I forgot, it works perfectly on windows
Title: Re: Bug into bringtofront?
Post by: xinyiman on May 29, 2019, 03:48:57 pm
Identically problem when runtime created frame. Look example
Title: Re: Bug into bringtofront?
Post by: Hansaplast on May 29, 2019, 04:01:07 pm
Hi xinyiman,

I've tried your example project with Lazarus from trunk (Lazarus 2.1.0 r61292M FPC 3.0.4 x86_64-darwin-cocoa (alpha)), and I'm not seeing any problems.
Maybe I'm testing it wrong?
I've tested the project you posted first.
At startup the frame is not visible.
Clicking any of the 4 buttons makes the frame visible near the button.
Clicking the "Chiudi" button hides the frame again.
Title: Re: Bug into bringtofront?
Post by: skalogryz on May 29, 2019, 05:17:01 pm
what you're running into is overlapping sibling controls.
http://wiki.freepascal.org/Cocoa_Interface#Overlapping_Widgets

This is a Cocoa feature, and cannot be reliably bypassed.
Title: Re: Bug into bringtofront?
Post by: xinyiman on May 29, 2019, 10:37:21 pm
Hi xinyiman,

I've tried your example project with Lazarus from trunk (Lazarus 2.1.0 r61292M FPC 3.0.4 x86_64-darwin-cocoa (alpha)), and I'm not seeing any problems.
Maybe I'm testing it wrong?
I've tested the project you posted first.
At startup the frame is not visible.
Clicking any of the 4 buttons makes the frame visible near the button.
Clicking the "Chiudi" button hides the frame again.
Impossible. Look image
Title: Re: Bug into bringtofront?
Post by: Hansaplast on May 29, 2019, 11:50:35 pm
I'm really not making this up.
Title: Re: Bug into bringtofront?
Post by: Hansaplast on May 29, 2019, 11:52:01 pm
Note:
If ListBox1 has focus, the focus border overlays the frame, but the listbox is still behind the frame.


Also; I used your first example, and just compiled it without modifying anything.
To change focus I used the TAB key.


Also note that I'm using Lazarus from trunk (SVN).
Lazarus 2.1.0 r61292M FPC 3.0.4 x86_64-darwin-cocoa (alpha)
Title: Re: Bug into bringtofront?
Post by: xinyiman on May 31, 2019, 09:20:45 am
Yesterday I did a test, with fpcupdeluxe I installed the latest version of lazarus trunk and it still didn't work. I can't base my projects on a method that doesn't work correctly in crossplatform mode. I have to find an equivalent thing that works on windows, mac and ubuntu. Ideas?