Re: [Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-29 Thread taazz
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 no

Re: [Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-06 Thread Flávio Etrusco
On Thu, Nov 6, 2014 at 3:41 AM, Sven Barth wrote: > On 06.11.2014 04:43, Flávio Etrusco wrote: >>> >>> Default values must be of ordinal, pointer or small set type (Delphi) >>> (See: >>> http://docwiki.embarcadero.com/RADStudio/XE7/en/E2146_Default_values_must_be_of_ordinal,_pointer_or_small_set_t

Re: [Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-05 Thread Sven Barth
On 06.11.2014 04:43, Flávio Etrusco wrote: Default values must be of ordinal, pointer or small set type (Delphi) (See: http://docwiki.embarcadero.com/RADStudio/XE7/en/E2146_Default_values_must_be_of_ordinal,_pointer_or_small_set_type_%28Delphi%29) After you added the 33-rd option now SizeOf(TGr

Re: [Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-05 Thread leledumbo
__ > Lazarus mailing list > Lazarus@.freepascal > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus Anybody wants to file an error message enhancement to the bugtracker? -- View this message in context: http://free-pascal-lazar

Re: [Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-05 Thread Flávio Etrusco
On Wed, Nov 5, 2014 at 12:33 PM, Bart wrote: > On 11/5/14, Werner Pamler wrote: > >> Recompiling the package LCLBase fails with the error: "Property can't >> have a default value". I think this message is misleading and confusing >> because the true issue seems to me that the set of TGridOptions

Re: [Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-05 Thread Rik van Kekem
On 05-11-2014 20:11, Howard Page-Clark wrote: I think you meant: "... cannot have a default value if the upper or lower bounds of the set's (or array's) base type have ordinal values *outside* the range 0..31." Yep That would be better ;) (That's what you get when you try to merge two oppo

Re: [Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-05 Thread Howard Page-Clark
On 05/11/2014 18:58, Rik van Kekem wrote: So it should be something like this (with my limited English): *Error: Property can't have a default value* Set properties or indexed properties cannot have a default value if the upper and lower bounds of the set's base type have ordinal values bet

Re: [Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-05 Thread Rik van Kekem
On 05-11-2014 19:31, Frederic Da Vitoria wrote: So the error message is not misleading at all ;) Error: Property can’t have a default value Set properties or indexed properties cannot have a default value. This may be me misunderstanding English, but I feel that it is

Re: [Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-05 Thread Frederic Da Vitoria
2014-11-05 18:35 GMT+01:00 Rik van Kekem : > So it's not that the set can't hold more than 32 items... > It's just you can't use *default* for a property if the set's base has > more than 32 values. > > This is from the Delphi manual (but I'm sure it also applies to FPC): > > The default and node

Re: [Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-05 Thread Mattias Gaertner
On Wed, 05 Nov 2014 19:12:04 +0100 Werner Pamler wrote: >[...] > 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. You can name it Options2 like TSynEdit. Mattias

[Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-05 Thread Werner Pamler
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

Re: [Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-05 Thread Rik van Kekem
So it's not that the set can't hold more than 32 items... It's just you can't use *default* for a property if the set's base has more than 32 values. This is from the Delphi manual (but I'm sure it also applies to FPC): The default and nodefault directives are supported only for ordinal types

Re: [Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-05 Thread Bart
On 11/5/14, Werner Pamler wrote: > Recompiling the package LCLBase fails with the error: "Property can't > have a default value". I think this message is misleading and confusing > because the true issue seems to me that the set of TGridOptions now > contains 33 elements. In my understanding, the

Re: [Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-05 Thread Michael Van Canneyt
On Wed, 5 Nov 2014, Werner Pamler wrote: For fpspreadsheet I would like to implement the feature of Excel or Libre/OpenOffice that multiple cell ranges can be selected. The grid component in this package, TsSpreadsheetGrid, currently can select only a single range (if goRangeSelect is in the

Re: [Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-05 Thread leledumbo
207-228.2.8 -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Having-more-than-32-elements-in-a-set-TGridOptions-of-TCustomGrid-tp4039097p4039099.html Sent from the Free Pascal - Lazarus mailing list archiv

[Lazarus] Having more than 32 elements in a set (TGridOptions of TCustomGrid)

2014-11-05 Thread Werner Pamler
For fpspreadsheet I would like to implement the feature of Excel or Libre/OpenOffice that multiple cell ranges can be selected. The grid component in this package, TsSpreadsheetGrid, currently can select only a single range (if goRangeSelect is in the grid's Options) due to its inheritance from