Recent

Author Topic: macOS & 64bit  (Read 13623 times)

MISV

  • Hero Member
  • *****
  • Posts: 783
Re: macOS & 64bit
« Reply #15 on: February 02, 2018, 05:18:51 pm »
Hi

Try a rescan of sources, this may fix it. ( Tools -> Rescan FPC Source Directory )
If issue is with IDE try a Clean Build. ( Tools -> Configure Build lazarus, in window that pops up make sure no 'Odd' settings  are set and tick the option Clean All.

Make sure your project options match the CPU and Wdgetset used,   carbon = i386, cocoa =X86-64.

Just some ideas


Did not work - but I will now try download fpcdeluxe with carbon - and hope it includes cocoa as well for when building apps.

MISV

  • Hero Member
  • *****
  • Posts: 783
Re: macOS & 64bit
« Reply #16 on: February 04, 2018, 02:07:50 am »
This kinda worked. Can compile all packages and my software with Cocoa on Lazarus - but debugger not working and I get an access violation on startup, so can't see my program running on Cocoa but still an improvement :)

The debugger error I am getting is

Quote
"Ooops, the debugger entered the error state"
...
Quote
Could not send a command to GDB

I have checked and offhand FPCdeluxe seems to have duplicatted he same GDB/debugger settings as I have been using for version 1.8

GNU debugger (gdb)
/usr/local/bind/gdb

Could it be a 32bit/64bit issues? I usually compiled 32bit/carbon/1.8 but cocoa is always 64bit right?
« Last Edit: February 04, 2018, 02:32:13 am by MISV »

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: macOS & 64bit
« Reply #17 on: February 04, 2018, 02:19:34 am »
Please provide a backtrace of the access violation

http://wiki.freepascal.org/Creating_a_Backtrace_with_lldb

MISV

  • Hero Member
  • *****
  • Posts: 783
Re: macOS & 64bit
« Reply #18 on: February 04, 2018, 02:31:34 am »
Please provide a backtrace of the access violation

http://wiki.freepascal.org/Creating_a_Backtrace_with_lldb

Will look into now - thanks - seems to be a problem triggered in own code somehow. Until I get GDB working this will be of great help. Thanks
« Last Edit: February 04, 2018, 02:36:22 am by MISV »

dieselnutjob

  • Full Member
  • ***
  • Posts: 217
Re: macOS & 64bit
« Reply #19 on: October 07, 2018, 05:32:56 pm »
I found that if I write a program that changes button height as in button1.height:=button1.heignt+1; that if I use the "normal" Lazarus with LCLWidgetType:=Cocoa then the height of the button increases as I would expect.

When I compile with/Applications/Utilities/laz-svn/lazbuild --pcp=~/.laz-svn --ws=cocoa --compiler=/usr/local/bin/ppcx64 --cpu=x86_64 project1.lpi. the button doesn't change height but instead moves down.

It seems that with the 64 bit one that button1.height actually manipulates button1.top

The weird thing is that if I do the same with memo1.height then it does correctly change the height.

So the problem is tbutton but not tmemo but only 64 bit.

I'm not sure how to report this.

thanks DNJ

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: macOS & 64bit
« Reply #20 on: October 07, 2018, 07:14:59 pm »
What's happening is that Cocoa buttons just stick to the "PushButton" style.
However, since the actual button rectangle is changed anyway, Cocoa draws the button "vertically" aligned to the center of the rectangle.
That's why it seems as if the button is moving down.

(IIRC, on Carbon, if button is greater than certain size, it would change its style from "push" to "square". This will allow the button to grow).


dieselnutjob

  • Full Member
  • ***
  • Posts: 217
Re: macOS & 64bit
« Reply #21 on: October 08, 2018, 12:49:14 pm »
Thank you for this.  I am away from my Mac for a few days but this page http://wiki.lazarus.freepascal.org/Cocoa_Internals/Buttons confirms what you say.

This page https://mackuba.eu/2014/10/06/a-guide-to-nsbutton-styles/ suggests that Cocoa has a "Square Button / NSShadowlessSquareBezelStyle (variable height)" option.  Is there a way to change a Tbutton to use that style?

 

TinyPortal © 2005-2018