[Lazarus] LazReport - Child band feature

2014-11-05 Thread Gabor Boros

Hi All,

I want to see and use child bands in LazReport. Opened an issue in the 
bugtracker and attached diff files (used trunk 46747). Please review, 
try, comment.


http://bugs.freepascal.org/view.php?id=26996

Gabor

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


Re: [Lazarus] TFMTBCDField problem

2014-11-05 Thread Chris Rempas
You were correct!
changing to the correct path does not compile again!
i get just one line with error :registerfcl.pas(43,3) Fatal: Can not find unit 
ServiceManager used by RegisterFCL. Check if package FCL is in the dependencies.

Regards,Chris 

 On Monday, November 3, 2014 5:38 PM, Joost van der Sluis jo...@cnoc.nl 
wrote:
   

 On 11/02/2014 08:05 PM, Chris Rempas wrote:
 Latest news!
 I did a full uninstall and install Lazarus again, installed my
 components, compiled my project.
 Then, i changed the FPC folders to 2.7.1 and rebuild Lazarus. worked fine.
 Execute program, crush on reading real values.
 I put NULL in the database, execute program, all ok!

I'm affraid you are still using fpc 2.6.4. With your re-installation of 
Lazarus, you also restored the old fpc-version.

Please make sure that in tools-options also the compiler-path points to 
fpc/ppc386/ppcx64 of version 2.7.1. (ie: c:\pp\..)

Joost.


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


[Lazarus] OT: Fast image viewer

2014-11-05 Thread Leonardo M. Ramé
Hi, I'm lookig for a fast-small JPEG/BMP image viewer with Zoom, Pan, 
and Print (if possible), to be launched from my application and passing 
a File param or better a Stream to be opened.


Can anyone recommend such viewer?. I need it for Windows.

Regards,
--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877


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


[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 TCustomGrid.


My idea is to add a new goMultiSelect option to TCustomGrid directly 
since this might be an interesting feature for other applications as 
well, and then to write additional code to store multiple range 
rectangles. It shouldn't be too difficult, but I am failing already at 
the very first step: adding the new option to the type TGridOption. This 
is the new declaration:


type
  TGridOption = (
goFixedVertLine,  // Ya
goFixedHorzLine,  // Ya
goVertLine,   // Ya
goHorzLine,   // Ya
goRangeSelect,// Ya
goDrawFocusSelected,  // Ya
goRowSizing,  // Ya
goColSizing,  // Ya
goRowMoving,  // Ya
goColMoving,  // Ya
goEditing,// Ya
goAutoAddRows,// JuMa
goTabs,   // Ya
goRowSelect,  // Ya
goAlwaysShowEditor,   // Ya
goThumbTracking,  // ya
// Additional Options
goColSpanning,// Enable cellextent calcs
goRelaxedRowSelect,   // User can see focused cell on goRowSelect
goDblClickAutoSize,   // dblclicking columns borders (on hdrs) 
resize col.
goSmoothScroll,   // Switch scrolling mode (pixel scroll is by 
default)

goFixedRowNumbering,  // Ya
goScrollKeepVisible,  // keeps focused cell visible while scrolling
goHeaderHotTracking,  // Header cells change look when mouse is 
over them

goHeaderPushedLook,   // Header cells looks pushed when clicked
goSelectionActive,// Setting grid.Selection moves also cell cursor
goFixedColSizing, // Allow to resize fixed columns
goDontScrollPartCell, // clicking partially visible cells will not 
scroll

goCellHints,  // show individual cell hints
goTruncCellHints, // show cell hints if cell text is too long
goCellEllipsis,   // show ... if cell text is too long
goAutoAddRowsSkipContentCheck,//BB Also add a row (if AutoAddRows 
in Options) if last row is empty

goRowHighlight,   // Highlight the current Row
goMultiSelect // Enable selection of multiple ranges  NEW
  );
  TGridOptions = set of TGridOption;

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 elements of a set 
correspond to the bits of an integer. In a 32-bit OS, therefore, a set 
can only contain 32 elements - there is one too many now...


Is this interpretation correct?

OK, here I could circumvent this issue by introducing a new boolean 
property MultiSelect which is evaluated when goRangeSelect is active. 
Maybe this is even better than the goMultiSelect option because it 
bypasses the conflict with goRangeSelect.


But what if I would not have this possibility? Is there a way to extend 
the set to more than 32 elements? If not, split the Options into groups 
of options like VirtualTreeView does? I fear the options of the grid 
components will require a major redsign soon.


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


Re: [Lazarus] lazarus trunk compile fails with fpc trunk

2014-11-05 Thread Joost van der Sluis

On 11/04/2014 04:50 PM, waldo kitty wrote:

i updated my fpc trunk last night to 28981 and this morning i updated my
lazarus trunk to 46747... fpc built properly with no problems...
lazarus, on the other hand, gave me the following failure output...



   $004AA2F3  TABSTRACTEXTERNALTOOL__LEAVECRITICALSECTION,  line 1178 of
ideexterntoolintf.pas
   $004B43E7  TEXTERNALTOOL__SETTHREAD,  line 570 of exttools.pas


Could you try with fpc-trunk revision 28964? It could be that 28965 
introduces this problem. But I want to know for sure before I pass this 
one to Jonas. (I also see that you are on Windows... well, please try 
28964, then we know more)


Joost.

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


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

2014-11-05 Thread leledumbo
 In my understanding, the elements of a set 
 correspond to the bits of an integer. In a 32-bit OS, therefore, a set 
 can only contain 32 elements - there is one too many now... 
 
 Is this interpretation correct?

http://www.freepascal.org/docs-html/prog/progsu163.html#x207-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 archive at Nabble.com.

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


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 grid's Options) due to its 
inheritance from TCustomGrid.




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 elements of a set correspond to the bits of an 
integer. In a 32-bit OS, therefore, a set can only contain 32 elements - 
there is one too many now...


Is this interpretation correct?


Yes.



OK, here I could circumvent this issue by introducing a new boolean property 
MultiSelect which is evaluated when goRangeSelect is active. Maybe this is 
even better than the goMultiSelect option because it bypasses the conflict 
with goRangeSelect.


But what if I would not have this possibility? Is there a way to extend the 
set to more than 32 elements? If not, split the Options into groups of 
options like VirtualTreeView does? I fear the options of the grid components 
will require a major redsign soon.


The 32-bit limit cannot be circumvented easily. 
It would require a major redesign of streaming and rtti. 
Your fastest path is splitting the options.


Michael.

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


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

2014-11-05 Thread Bart
On 11/5/14, Werner Pamler werner.pam...@freenet.de 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 elements of a set
 correspond to the bits of an integer. In a 32-bit OS, therefore, a set
 can only contain 32 elements - there is one too many now...

 Is this interpretation correct?

I think it's not.

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(TGridOptions) = 32 bytes.
Every option is stored as a bit, so you can have 256 (=32*8) options (I think).

Bart

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


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):
quote
The default and nodefault directives are supported only for ordinal 
types and for set types, *provided the upper and lower bounds of the 
set's base type have ordinal values between 0 and 31;*

/quote
Source: http://docwiki.embarcadero.com/RADStudio/XE6/en/Properties

So the error message is not misleading at all ;)
quote
Error: Property can’t have a default value
  Set properties or indexed properties cannot have a default value.
/quote

Maybe you can skip the default command for property and set the default 
in Create. (Will that work correctly?)


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 elements of a set
correspond to the bits of an integer. In a 32-bit OS, therefore, a set
can only contain 32 elements - there is one too many now...

Is this interpretation correct?


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


Re: [Lazarus] OT: Fast image viewer

2014-11-05 Thread Frederic Da Vitoria
2014-11-05 13:24 GMT+01:00 Leonardo M. Ramé l.r...@griensu.com:

 Hi, I'm lookig for a fast-small JPEG/BMP image viewer with Zoom, Pan, and
 Print (if possible), to be launched from my application and passing a File
 param or better a Stream to be opened.

 Can anyone recommend such viewer?. I need it for Windows.


Maybe JPEGView? http://sourceforge.net/projects/jpegview/

If you want something better in terms of usability:
http://www.faststone.org/ , but definitely not as small as JPEGView

-- 
Frederic Da Vitoria
(davitof)

Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[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.


Anyway, I know a solution for my problem: 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.


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


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 werner.pam...@freenet.de 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 mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OT: Fast image viewer

2014-11-05 Thread Leonardo M. Ramé


El 05/11/14 a las 15:08, Frederic Da Vitoria escibió:

2014-11-05 13:24 GMT+01:00 Leonardo M. Ramé l.r...@griensu.com
mailto:l.r...@griensu.com:

Hi, I'm lookig for a fast-small JPEG/BMP image viewer with Zoom,
Pan, and Print (if possible), to be launched from my application and
passing a File param or better a Stream to be opened.

Can anyone recommend such viewer?. I need it for Windows.


Maybe JPEGView? http://sourceforge.net/projects/jpegview/

If you want something better in terms of usability:
http://www.faststone.org/ , but definitely not as small as JPEGView

--
Frederic Da Vitoria
(davitof)


Thanks Frederic, JPEGView looks great!.

--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877


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


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 r...@graficalc.nl:

 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):
 quote
 The default and nodefault directives are supported only for ordinal types
 and for set types, *provided the upper and lower bounds of the set's base
 type have ordinal values between 0 and 31;*
 /quote
 Source: http://docwiki.embarcadero.com/RADStudio/XE6/en/Properties

 So the error message is not misleading at all ;)
 quote
 Error: Property can’t have a default value
   Set properties or indexed properties cannot have a default value.
 /quote


This may be me misunderstanding English, but I feel that it is misleading:
To me, Set properties cannot have a default value means that even a set
with 2 elements could not have a default value.

-- 
Frederic Da Vitoria
(davitof)

Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


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 ;)
quote
Error: Property can’t have a default value
  Set properties or indexed properties cannot have a default value.
/quote


This may be me misunderstanding English, but I feel that it is 
misleading: To me, Set properties cannot have a default value means 
that even a set with 2 elements could not have a default value.
You are absolutely correct. But it does point in the right direction 
(unlike Werner expected) ;) However expanding the error-message to 
include the text that it only applies to sets with base types with more 
than 32 values would make it not fit on screen. But the help-page for 
the message could be expanded to include this text. (I got it from 
http://www.freepascal.org/docs-html/user/userse62.html)


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 
between 0 and 31.


This message also comes when you right-click the error and choose help. 
So it could be clarified there too.


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


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 between 0 and 31.


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.


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


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 opposite English sentences together.)
(From http://docwiki.embarcadero.com/RADStudio/XE6/en/Properties and 
http://www.freepascal.org/docs-html/user/userse62.html)


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


Re: [Lazarus] TFMTBCDField problem

2014-11-05 Thread Chris Rempas
so where do i send the flowers? :)
and another question...where is the conversation about the string --- 
UTF8Sting convertions?
i had to use UTF8String in a library and is not compiling now because i call 
UTF8Delete and it says that parameter arguments must match exactly 

 On Wednesday, November 5, 2014 4:50 PM, Joost van der Sluis 
jo...@cnoc.nl wrote:
   

 On 11/05/2014 10:39 AM, Chris Rempas wrote:
 You were correct!

 changing to the correct path does not compile again!

 i get just one line with error :
 registerfcl.pas(43,3) Fatal: Can not find unit ServiceManager used by
 RegisterFCL. Check if package FCL is in the dependencies.

You could try to run Free Pascal on the command-line (powershell). Try 
'ppc386 -vut'. Then see which fpc.cfg is being used. Open that file and 
search for lines that start with '-Fu' and see if the path is correct. 
(It should point to c:\pp - if that's where you've installed fpc)

Joost.



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


Re: [Lazarus] lazarus trunk compile fails with fpc trunk

2014-11-05 Thread waldo kitty

On 11/5/2014 10:14 AM, Joost van der Sluis wrote:

On 11/04/2014 04:50 PM, waldo kitty wrote:

i updated my fpc trunk last night to 28981 and this morning i updated my
lazarus trunk to 46747... fpc built properly with no problems...
lazarus, on the other hand, gave me the following failure output...



   $004AA2F3  TABSTRACTEXTERNALTOOL__LEAVECRITICALSECTION,  line 1178 of
ideexterntoolintf.pas
   $004B43E7  TEXTERNALTOOL__SETTHREAD,  line 570 of exttools.pas


Could you try with fpc-trunk revision 28964? It could be that 28965 introduces
this problem. But I want to know for sure before I pass this one to Jonas. (I
also see that you are on Windows... well, please try 28964, then we know more)


i'll try but i've never backed up to a specific revision... definitely not with 
tortoiseSVN... but i'll take a look and see what i can do...


--
 NOTE: No off-list assistance is given without prior approval.
   Please *keep mailing list traffic on the list* unless
   private contact is specifically requested and granted.

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


Re: [Lazarus] lazarus trunk compile fails with fpc trunk

2014-11-05 Thread waldo kitty

On 11/5/2014 10:14 AM, Joost van der Sluis wrote:

On 11/04/2014 04:50 PM, waldo kitty wrote:

i updated my fpc trunk last night to 28981 and this morning i updated my
lazarus trunk to 46747... fpc built properly with no problems...
lazarus, on the other hand, gave me the following failure output...



   $004AA2F3  TABSTRACTEXTERNALTOOL__LEAVECRITICALSECTION,  line 1178 of
ideexterntoolintf.pas
   $004B43E7  TEXTERNALTOOL__SETTHREAD,  line 570 of exttools.pas


Could you try with fpc-trunk revision 28964? It could be that 28965 introduces
this problem. But I want to know for sure before I pass this one to Jonas. (I
also see that you are on Windows... well, please try 28964, then we know more)


/if/ i did it right then that seems to have fixed it... i was able to get back 
to r28964 in FPC and get it compiled after a distclean (which i normally do 
before updating)... after that i ran my normal updatelaz script which pulled 
some new code and the built to completion... it looks like it went ok...


--
 NOTE: No off-list assistance is given without prior approval.
   Please *keep mailing list traffic on the list* unless
   private contact is specifically requested and granted.

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


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 bartjun...@gmail.com wrote:
 On 11/5/14, Werner Pamler werner.pam...@freenet.de 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 elements of a set
 correspond to the bits of an integer. In a 32-bit OS, therefore, a set
 can only contain 32 elements - there is one too many now...

 Is this interpretation correct?

 I think it's not.

AFAICS it is.

 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(TGridOptions) = 32 bytes.
 Every option is stored as a bit, so you can have 256 (=32*8) options (I 
 think).

No, SizeOf(TGridOptions) = 4 (bytes) = 32 bits = 32 options.

Best regards,
Flávio

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


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

2014-11-05 Thread leledumbo
Rik van Kekem wrote
 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 opposite English sentences together.)
 (From http://docwiki.embarcadero.com/RADStudio/XE6/en/Properties and 
 http://www.freepascal.org/docs-html/user/userse62.html)
 
 
 --
 ___
 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-lazarus.989080.n3.nabble.com/Lazarus-Having-more-than-32-elements-in-a-set-TGridOptions-of-TCustomGrid-tp4039097p4039115.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

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


[Lazarus] Existence of Lazarus package for DragonFly BSD

2014-11-05 Thread Mehmet Erol Sanliturk
Dears All ,

Is there a package of Lazarus ( and fpc , fpc-src ) for DragonFly BSD which
I can download and install and use ?

In the dPorts , there is only fpc-doc package .


Thank you very much .

Mehmet Erol Sanliturk
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


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(TGridOptions) = 32 bytes.
Every option is stored as a bit, so you can have 256 (=32*8) options (I think).


No, SizeOf(TGridOptions) = 4 (bytes) = 32 bits = 32 options.


If a 33rd option is added he's right:

=== code begin ===

program tsettest;

type
  TTest = (
t1,
t2,
t3,
t4,
t5,
t6,
t7,
t8,
t9,
t10,
t11,
t12,
t13,
t14,
t15,
t16,
t17,
t18,
t19,
t20,
t21,
t22,
t23,
t24,
t25,
t26,
t27,
t28,
t29,
t30,
t31,
t32,
t33
  );

  TTests = set of TTest;

var
  t: TTests;
begin
  Writeln(SizeOf(t));
end.

=== code end ===

=== output begin ===

% ./tsettest
32

=== output end ===

Regards,
Sven

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