Data Plot Class 64-bit

If you have specific questions or problems with any of my Open Source Projects, post them here.

Data Plot Class 64-bit

Postby Urban » Fri Feb 17, 2017 2:31 am

Hello Roger,
The data plot class is really great, saved me a lot of work for an application that reads sensors from an arduino. I also realised that I used your CoolTerm that also is great.

I also tried to build the app in 64-bit but it crashes when I access the Data Plot Class, I think. Since there is no possibility to debug 64-bit it is difficult to find the reason.

Anyhow, many thanks for your excellent work!
Regards,
Urban
Urban
 
Posts: 1
Joined: Wed Feb 15, 2017 1:10 pm

Re: Data Plot Class 64-bit

Postby roger » Fri Feb 17, 2017 11:01 am

Hi Urban,

I believe that the crash in the 64-bit build is related to a declare that is used to determine the screen resolution on retina Macs. I updated the project for retina support before XOJO started supporting HiDPI displays. I'm working on updating the DataPlot classes for cross-platform HiDPI support at the moment, but in the meantime you can make a simple change to resolve the issue. Search the project for a Structure called CGRect. This structure has 4 values, named "X", "Y", "Width", and "Height". This is an OS X object to describe a rectangle, and it expects its parameters to be of type "CGFloat", which is a Mac-exclusive datatype with is the same as a "Single" on 32-bit systems and equivalent to "Double" on 64-bit systems. Previous versions of Xojo, before it started supporting 64-bit builds, didn't support the "CGFloat" datatype, which is why the "CGRect" structure uses the "Single" data type for its values. However, the current XOJO IDE supports "CGFloat". To make the project work for both 32-bit as well as 64-bit builds, change the datatype of all 4 parameters in CGRect to from "Single" to "CGFloat", and it should work fine. Let me know how that goes.

I should be able to post the updated DataPlot classes to the opensource site within the next few days. I'll reply to the is post again once it's ready for download.

Roger
User avatar
roger
Site Admin
 
Posts: 200
Joined: Fri Apr 24, 2009 12:41 am


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron