Recent

Author Topic: isFlipped isn't  (Read 3009 times)

syntonica

  • Full Member
  • ***
  • Posts: 120
isFlipped isn't
« on: December 07, 2019, 06:13:50 pm »
I've only been here a week, so I don't feel comfortable reporting a bug quite yet as I'm still finding my way around the forum, the bug tracker, and Pascal. So...

In Lazarus, some windows (NSViews) do not have their isFlipped property set correctly.  My example, attached, is of the Help Selector window.

Edit: Preview doesn't apparently show your attachment. :(





wp

  • Hero Member
  • *****
  • Posts: 7353
Re: isFlipped isn't
« Reply #1 on: December 07, 2019, 07:23:22 pm »
"IsFlipped" -- this is for right-to-left mode, isn't it? So the control that you show is flipped vertically instead of horizontally, right? This control is a TTreeView. Are the other controls which do not flip correctly TreeViews as well? Treeviews are used, for example, in the object tree above the object inspector, the project inspector, IDE options ("Tools" > "Options"), Project group etc.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

syntonica

  • Full Member
  • ***
  • Posts: 120
Re: isFlipped isn't
« Reply #2 on: December 07, 2019, 07:52:24 pm »
isFlipped handles the coordinate system in a view. Cocoa standard is Cartesian with 0,0 in the bottom right. You must set isFlipped to get 0,0 in the upper right. 

Other treeviews seem to show up fine in Lazarus. There's probably subclassed views and one subclass is not set up properly compared to the others.

Alextp

  • Hero Member
  • *****
  • Posts: 1029
    • UVviewsoft
Re: isFlipped isn't
« Reply #3 on: December 07, 2019, 08:55:38 pm »
Pls tell us how do you call that Help Selector dlg, I cannot find such dlg in my IDE.

syntonica

  • Full Member
  • ***
  • Posts: 120
Re: isFlipped isn't
« Reply #4 on: December 07, 2019, 09:18:24 pm »
Pls tell us how do you call that Help Selector dlg, I cannot find such dlg in my IDE.
Put cursor over a word in the Source Editor and press F1 to get help.

Now that's really bizarre... When I went back (i.e. the Help window was redrawn), it was right-side up!

There's some wackiness afoot here!

syntonica

  • Full Member
  • ***
  • Posts: 120
Re: isFlipped isn't
« Reply #5 on: December 07, 2019, 09:24:53 pm »
I was able to get the Help window open despite the many warnings only to find this!

(Also, please note the ?'s for umlauts.)

syntonica

  • Full Member
  • ***
  • Posts: 120
Re: isFlipped isn't
« Reply #6 on: December 07, 2019, 10:33:14 pm »
I've been playing with different windows.  It appears that the views are drawn first upside down, and then flipped. Usually.

This is backwards--the flipped property should be overridden as part of the subclassing, not set after the view has been populated.

Code: C  [Select][+][-]
  1. -(BOOL) isFlipped                               {       return YES;     }


syntonica

  • Full Member
  • ***
  • Posts: 120
Re: isFlipped isn't
« Reply #7 on: December 08, 2019, 05:58:49 am »
I'm having no luck on the Cocoa front. Closed windows are not being disposed of.

trev

  • Hero Member
  • *****
  • Posts: 823
  • Former Delphi 1-7 and 10.2 User
Re: isFlipped isn't
« Reply #8 on: December 08, 2019, 07:16:42 am »
Quote
I'm having no luck on the Cocoa front. Closed windows are not being disposed of.

When this happens I quit and restart which fixes the issue.
o Lazarus v2.1.0 r63598, FPC v3.3.1 r45778, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

Alextp

  • Hero Member
  • *****
  • Posts: 1029
    • UVviewsoft
Re: isFlipped isn't
« Reply #9 on: December 08, 2019, 11:26:08 am »
Try to update Lazarus ("svn up" in lazarus folder) and recompile. Cocoa bugs are being fixed..

Alextp

  • Hero Member
  • *****
  • Posts: 1029
    • UVviewsoft
Re: isFlipped isn't
« Reply #10 on: December 08, 2019, 11:28:02 am »
Cocoa treeview was fixed in May 2019
https://bugs.freepascal.org/view.php?id=34334

syntonica

  • Full Member
  • ***
  • Posts: 120
Re: isFlipped isn't
« Reply #11 on: December 08, 2019, 11:06:15 pm »
Try to update Lazarus ("svn up" in lazarus folder) and recompile. Cocoa bugs are being fixed..
My Lazarus install did not have the .svn folder, so I pulled the lazarus_2_0 branch and did "make all". It selected "Target OS: Darwin for x86_64" and did fine until it hit Carbon, where it errored out with "Error: User defined: only cpu i386 is supported" and failed. "Make" is on my short list of things I need to learn as I wean myself off of Eclipse/XCode (I'm currently using Geany as a crutch) , so which switches do I need to use to get a full, working x64 Cocoa IDE?  Thanks in advance.

trev

  • Hero Member
  • *****
  • Posts: 823
  • Former Delphi 1-7 and 10.2 User
Re: isFlipped isn't
« Reply #12 on: December 09, 2019, 01:13:41 am »
This is the script I use on macoS 10.14.x:

Code: [Select]
#!/bin/sh
make clean LCL_PLATFORM=cocoa CPU_TARGET=x86_64 bigide

Note: bigide adds the same packages as the release version.
o Lazarus v2.1.0 r63598, FPC v3.3.1 r45778, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

syntonica

  • Full Member
  • ***
  • Posts: 120
Re: isFlipped isn't
« Reply #13 on: December 09, 2019, 02:02:48 am »
Thanks! I was able to compile the latest.  However, I am still seeing both issues. Well, I was, but then I wasn't... :/


Also, I'm not getting a crash report, but lhelp takes down Lazarus, who reports this message:
"Service exited due to SIGPIPE".  It makes it a little harder for me to learn if I have to hunt through 6 huge PDFs.


As soon as I get my sea legs, I'll start poking around to see what's going on with these...

Alextp

  • Hero Member
  • *****
  • Posts: 1029
    • UVviewsoft
Re: isFlipped isn't
« Reply #14 on: December 09, 2019, 10:34:24 am »
@syntonica
Do you mean that mentioned bugreport is not fixed for you?
https://bugs.freepascal.org/view.php?id=34334
Do you see Treeview flipped anyway?

 

TinyPortal © 2005-2018