Forum > Carbon

Is Mac carbon broken..

(1/3) > >>

Josh:
Hi

I have an old app that must stay on carbon for s while yet; as it is run on old mac's.

I downloaded latest trunk of fpc and laz for x64 cocoa, and the cross compiler for i386 darwin.

If I try to compile any project; even a blank form I get error

carbongdiobjects.pp(2072,45) Error: Incompatible type for arg no. 1: Got "Array[0..1] Of Single", expected "TCarbonDashes"


--- Code: ---case FStyle of
    PS_DASH:
      begin
        ADashes := GetDashes(CarbonDashStyle);
        CGContextSetLineDash(ADC.CGContext, 0, @ADashes[0], Length(ADashes));
      end;
    PS_DOT:
      begin
        ADashes := GetDashes(CarbonDotStyle);
        CGContext

--- End code ---


Any ideas

dbannon:
Josh, I used fixes (rather than trunk) a few days ago to build the carbon version of my app. All good.

As its likely no one is updating anything to do with Carbon anymore, there would seem very little point in you using trunk anyway (?)

Davo

PascalDragon:

--- Quote from: dbannon on June 17, 2019, 01:50:55 am ---Josh, I used fixes (rather than trunk) a few days ago to build the carbon version of my app. All good.

As its likely no one is updating anything to do with Carbon anymore, there would seem very little point in you using trunk anyway (?)

--- End quote ---
Only because Carbon is no longer going to be supported on new Macs doesn't mean that Lazarus should stop supporting Carbon. For older Macs that might still be necessary.

@josh: maybe best report a bug.

Thaddy:
Maybe something like this, note I eddited the code later:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---type PCarbonDashes = ^TCarbonDashes // andCGContextSetLineDash(ADC.CGContext, 0, PCarbonDashes(@ADashes[0]), Length(ADashes));// count = length(Adashes) indeed[
Anyway, I noticed that TCarbonDashes is declared as a dynamic array. now. So it can be that ADashes is declared wrong.
The error indicates you used a fixed length array[0..1] for ADashes instead of a dynamic array.

nsl:

GetDashes expects parameter of type TCarbonDashes where
TCarbonDashes = array of Float32;

But the parameter passed is
CarbonDashStyle: Array [0..1] of Single

Float32 is alias for Single so should be assignment compatible.

I tried compiling the trunk code with version 3.0.4 I386 compiler and Carbon with no errors.

Could this be a compiler version issue?

Navigation

[0] Message Index

[#] Next page

Go to full version