On 05/11/2014 20:12 μμ, Werner Pamler wrote:
Thanks to all. What I learn from the answers is that a set *can* contain more than 32 elements, but exceeding this number would break existing forms. And the option of not specifying a default value would break existing forms as well because their non-stored defaults would not be there any more.
*Wrong *the default values are not stored because there is no need to store them being there would effectively have no value what so ever. Keep in mind that the default specifier in a property is there to inform the streaming mechanism for the default value *_and only to inform_* You are required to make sure that the property is initialized to that value in the constructor of the class otherwise you will have problems mostly with expecting one behavior and getting an other.


Anyway, I know a solution for my problem:

You only have an assumed problem not a real one try it for your self.

Introduce an additional property "RangeSelectMode=(rsmSingleRange, rsmMultiRange)" which allows to fine-tune the behavior of the goRangeSelect option of the grid. I'll post a corresponding patch maybe later today or tomorrow.

The next guy wanting to add a new option to TGridOptions, however, will face that same issue again. Maybe new options will have to be split off into a new OptionsEx property.

There are reasons to do that mostly it has to do with support of external specifications like COM/ActiveX but there is no reason for the internal stuff (yet anyway) not until you have more than 255 values.



--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to