Recent

Author Topic: Recent TtreeView added property that is already in the Options property, WHY?  (Read 462 times)

jamie

  • Hero Member
  • *****
  • Posts: 6090
I just did a trunk update and now the TTreeView has an exposed Property of SHOWLINES that already exists in the Option properties.

 Why are these being duplicated?

 Do you understand how hard it is to manage this kind of riffraff?

So, the Property of SHOWLINES will show at Design time and Runtime whereas the Property of SHOWLINES in the options only shows at runtime, where is the value of this? I only need it to show at runtime and it looks ugly, btw.

 There is already related issues like this in things like the combobox where duplicated Options verses single properties collide!

 On top of this, the OP method requires only one entity in the LFM resource for the complete set of options, whereas the single properties require an entry for each.

 And how about the other items like that, that exists in the OP property and also as a single entity?

 I have no problem with using sets to crunch the code and file space, maybe I am special.

QA has been thrown out the window.

EDIT:
  I see, just because its Delphi Compatible. So if Delphi jumped off a cliff, there are many that will follow?

  I have no problem with removing items from the Option property, i know how to fix between releases.

 But really, do we have to live with duplicating functions and try to ensure they don't collide ?

« Last Edit: June 28, 2023, 04:04:21 am by jamie »
The only true wisdom is knowing you know nothing

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
property ShowLines and option tvoShowLines were both added in 2002. That is over 20 years ago.
A getter for property ShowLines :
Code: Pascal  [Select][+][-]
  1. function TCustomTreeView.GetShowLines: boolean;
  2. begin
  3.   Result:=(tvoShowLines in FOptions);
  4. end;
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

jamie

  • Hero Member
  • *****
  • Posts: 6090
I meant to say "ShowSeparators"

The point I was trying to make was that in the Options Properties, this already exists so it's a duplication of function but even so, the newly added Property of ShowSeparators will show at design time and check mark the one in the OPTION list too!
 
 But if you check mark the one in the OPTION list, It also checks marks the one in the normal list but it doesn't show the lines in the designer.

  This is a collision trying to maintain duplicate functionality and if you look, you will find more of that in there with others.

 Can't we make a choice of where and how these properties are represented with only one source of manipulating them?

I see that Delphi does not seem to have a OPTION property set, unless I missed something?
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018