Recent

Author Topic: TAChart.Series.Source.Sorted  (Read 6130 times)

WDB463

  • New Member
  • *
  • Posts: 11
TAChart.Series.Source.Sorted
« on: June 30, 2011, 10:01:51 am »
By using the built-in sources the sorted property is not stored if it is changed in the property editor. It must be set during FormCreate or anywhere other during run time. Is this a feature or a bug?

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: TAChart.Series.Source.Sorted
« Reply #1 on: June 30, 2011, 04:49:59 pm »
Quote
Is this a feature or a bug?

It is a little of both. Unfortunately, properties of built-in source are not saved by the IDE,
and I am unable to fix that from inside of TAChart.
I have vague plans to fix this in the IDE, but they are very low priority for me,
since I do not know IDE very well (and to not have commit rights for it),
and TAChart already takes all the time I can spend on Lazarus.
As a workaround, you can create a separate ListSource at design time.

WDB463

  • New Member
  • *
  • Posts: 11
Re: TAChart.Series.Source.Sorted
« Reply #2 on: June 30, 2011, 05:16:00 pm »
This is not a problem and only one line of code.

WDB463

  • New Member
  • *
  • Posts: 11
Re: TAChart.Series.Source.Sorted
« Reply #3 on: July 06, 2011, 04:30:32 pm »
I believe I understand the problem:

Properties of TPersistent objects will be stored in the lfm file inside the owner object (shown black in the property editor) while properties of TComponent are not stored because normally they are created and linked during design time by the form (shown brown/green in the property editor) so that they are stored by them self.

The here used built-in component is therefore "underhand" made during runtime and the design editor handle it as a component property in general where only the name of a linked component is stored during design time. Therefore this is not really a problem of the IDE.

I think the only way to overcome this a little confusing problem is to write a special PropertyEditor for TCustomChartSource as part of the package what is a mixture of TPersistentPropertyEditor and TComponentPropertyEditor (but I do not have evaluate the specific differences between both up to now). But I do not know if it's worth the effort...

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: TAChart.Series.Source.Sorted
« Reply #4 on: July 06, 2011, 05:22:25 pm »
Yes, that is correct.
It is not a high priority for me too -- there are lots of things to do:
http://wiki.lazarus.freepascal.org/TAChart#Roadmap

But you are, of course, welcome to investigate and fix the issue.

 

TinyPortal © 2005-2018