Is TAChart portable to Cocoa? lazarus / 55-TAChart ---------------------------------------------------------------------- AL · 2020-01-07 03:28 I have a Windows application that I am trying to port to MacOS. It uses TAChart. I am cross-compiling in Windows10  to cocoa. The code compile fine, but whe I run the program (in a VMware machine), the charts are inverted left-right and up-down. So they are like mirror image.  How can I resolve this? My charts are tlineseries if that make a difference Thank you. ---------------------------------------------------------------------- wp · 2020-01-07 09:18 I don't have access to a Mac, so I cannot provide specific help. But there is a similar topic about a flipped TreeView (https://forum.lazar us.freepascal.org/index.php/topic,47675.msg341943.html#msg341943) - maybe this can help. Please report back if this could solve the issue, and what you exactly did to solve the issue so that I can include it in TAChart. ---------------------------------------------------------------------- AL · 2020-01-07 13:37 You mean nobody has used a Tchart in MacOs up to now? ---------------------------------------------------------------------- nsl · 2020-01-07 15:30 I had an application using TAChart working a few months ago. I just recompiled and with a few changes to do with crt1.10.5 I got it working with MacOS 10.14.6 with Cocoa. Also copied the TAChart test application 'Basic' from the lazarus/components/tachart/demo folder and compiled this after changing target CPU and widgetset. Got this working with no sign of axis inversion. All of this with Lazarus 2.1.0 rev 61787. Not the latest version so this may be a problem ---------------------------------------------------------------------- wp · 2020-01-07 15:44 TAChart uses simple TCanvas drawing commands. Can you reproduce the issue with something like this? Add a Paintbox to a form and assign this OnPaint handler to it: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Paintbox1Paint(Sender: TObject);begin  Paintbox1.Canvas.Line(0, 0, Paintbox1.Width, Paintbox1.Height);end;The line should run from top-left to right-bottom. if it does not you should write a bugreport and add this project as an example. You could also find out the exact breaking revision. Update your svn to a revision half-way between the last working and the current revision. if this intermediate revision is working go forward half-way to the latest non-working revision, if not go back half-way to the latest working revision, etc. After a few iterations you will have found the guilty revision. ---------------------------------------------------------------------- AL · 2020-01-07 21:29 Will try that thank you. I set my target OS as Darwin is that OK.  I see there is also MAcOS in the list. UPDATE:  tried your sample and it works OK.  Nice line like that:   \ Now: I was surprised to see that my executable file had no extention (as should be in MacOS). When I compile MY program I always get a file with EXE extention that I have to remove!!! Also My program in windows has about 30 Mb and in MacOS it is about 10 Mb.  I was surprised of that. I will go through the settings again trying to find what I did wrong. Any idea what could cause that?  Compiler directive like objectivec, etc. ---------------------------------------------------------------------- trev · 2020-01-08 00:06 Quote from: AL on January 07, 2020, 10:29:56 pmI set my target OS as Darwin is that OK.  I see there is also MAcOS in the list. MacOS is for "Classic MacOS" (starting with System 1 in 1984 and ending with Mac OS 9 in 2001). Darwin is for "macOS" (formerly marketed as Mac OS X and OS X). Do not confuse MacOS and macOS ---------------------------------------------------------------------- AL · 2020-01-08 00:13 Is it possible to copy and paste a tachart from one form to another? ---------------------------------------------------------------------- AL · 2020-01-08 03:17 I do not want to cross-post, but in another thread I posted this. It look like TAChart is OK, but something is flipping it in a mirror image.       Re: Help: How to run a Windows cross-compiled program on a MacOS « Reply #14 on: Today at 04:14:01 am »     Made a new test: Created a new project. Copy and Paste one chart and one button from my program. Compiled and tested on the VM MAC: Everything look fine. I deduct that it is one of the unit I use that throws things in mirror image for some reason. That will be tough to find! Here are the units I use in my main unit: USES {$IFDEF DARWIN} CocoaAll,MacOSALL, {$ENDIF} {$IFDEF WINDOWS}   Windows, MMSystem {$ENDIF}  Interfaces,SysUtils, Classes, Graphics, Forms, StdCtrls, ComCtrls, Grids,   ExtCtrls, Dialogs, Menus, TAGraph, TASeries, TACustomSeries,   TACustomSource, TATools, Types, TAChartUtils, TaPrint, ]"]>BlockedltiSeries,   PrintersDlgs, Printers, LCLType, Buttons, LCLTranslator,   controls, LCLIntf,  TADataTools, TAChartListbox , Math, LazUtils;    Anyone see something obvious? Do I need to use Cthreads with Darwin? ---------------------------------------------------------------------- wp · 2020-01-08 09:45 Quote from: AL on January 08, 2020, 01:13:58 amIs it possible to copy and paste a tachart from one form to another? In principle yes. It will copy the chart and series. But TAChart components like sources, transformations, styles, etc. are not copied automatically along with the chart and must be copied and re-linked separately. ---------------------------------------------------------------------- nsl · 2020-01-08 10:32 AL, trev - apologies for confusing macOS and MacOS. In the project settings for my projects the 'Target OS' is set to '(default)' which must resolve to 'Darwin'. AL - In my projects I have not needed to use any mac specific includes (e.g.  MacOSALL). All calls to mac-specific code must be through the LCL. ---------------------------------------------------------------------- AL · 2020-01-08 17:51 I cannot reproduce the problem except when using my original project. Every new test project that I try is OK.