Recent

Author Topic: SIGFPE when moving mouse over newly created chart  (Read 5979 times)

CM630

  • Hero Member
  • *****
  • Posts: 1631
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
SIGFPE when moving mouse over newly created chart
« on: September 14, 2012, 12:23:16 pm »
Probably I should send this to the bugzilla?
Here is a problem, that occurs in later versions of Lazarus (it does not exists in Build 38237 with FPC 2,6,1 but exists in version 38648, fpc. 2,6,1 (Windows XP)).
So if you run the example and press the button on the right and you do not move the mouse some curves will appear. But if after pressing the button you start moving thje mouse over the left area of the form (where the curves are shown), the app will crash.
« Last Edit: September 14, 2012, 12:58:09 pm by Ask »
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: SIGFPE when moving mouse over newly created chart
« Reply #1 on: September 14, 2012, 01:10:17 pm »
Thanks for your report -- TAChart does not (yet) have many users,
so every tester is very valuable.

To increase the effect of your contributions, please try to give your
messages more meaningful subjects -- for example,
I have edited the subject of this topic so that future users searching for the
same or similar problem may be able to find it.

Quote
Probably I should send this to the bugzilla?
In this specific case it is unnecessary, since I have already fixed the bug.
However, if you have (or will have) some bugs or feature requests
which take a long time to fix/implement, then it is a good idea to add them
to bugtracker so that they will not be forgotten.

Please test r38651.

Looking at your demo, I notice that you wrote HorizontalSync procedure yourself
instead of using TChartExtentLink component -- why?

CM630

  • Hero Member
  • *****
  • Posts: 1631
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: SIGFPE when moving mouse over newly created chart
« Reply #2 on: September 17, 2012, 08:02:46 am »
Thanks for your report -- TAChart does not (yet) have many users, so every tester is very valuable.
It would make a nice OCX, though I personally will have no benefit from that.

...please try to give your messages more meaningful subjects...
I tried to, but anyway I thought that it crashed while populating the data in the charts, so I would have mislead you, if I had done so.

Please test r38651.
Now it does not crash, thank you!

Looking at your demo, I notice that you wrote HorizontalSync procedure yourself instead of using TChartExtentLink component -- why?
I had no idea, that it existed, thought when I googled it for documentation I found out, that you have already recommended it to me.

Anyway, I could not find how to use dynamically. So I have:
Quote
chartextentlink1.linkedcharts.add
Add takes no parameters. I sought a property for chartextentlink1.linkedcharts.items[0] but I found nothing suitable. What shall I do?

BTW, I found that Chart1.Logicalextent.coords is read only. Just to let you know, if this is not done on purpose.

« Last Edit: September 17, 2012, 09:38:42 am by paskal »
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: SIGFPE when moving mouse over newly created chart
« Reply #3 on: September 17, 2012, 10:23:07 am »
Quote
chartextentlink1.linkedcharts.add
As usual for the TCollection, Add returns newly added item.
It was TCollectionItem, so required a cast.

For convenience, I overridden it in r38711 -- you can now write
Code: [Select]
ChartExtentLink1.LinkedCharts.Add.Chart := MyChart;
Quote
BTW, I found that Chart1.LogicalExtent.coords is read only.
It is a feature not of TAChart, but of FPC compiler, see
http://wiki.freepascal.org/User_Changes_2.4.0#Treating_direct-mapped_properties_as_regular_fields

CM630

  • Hero Member
  • *****
  • Posts: 1631
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: SIGFPE when moving mouse over newly created chart
« Reply #4 on: September 21, 2012, 10:17:21 am »
IMHO, ChartExtentLink1.LinkedCharts.Add.Chart(mychart) or ChartExtentLink1.LinkedCharts.AddChart(mychart) is better, it will be similar to
Series.add (myseries);
« Last Edit: September 21, 2012, 10:27:56 am by paskal »
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: SIGFPE when moving mouse over newly created chart
« Reply #5 on: September 21, 2012, 01:25:23 pm »
Ok, added ChartExtentLink1.AddChart in r38782

 

TinyPortal © 2005-2018