[fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Graeme Geldenhuys
Hi, - snip -- Include(WindowAttributes, waStayOnTop); // == doesn't compile with FPC 2.3.1 WindowAttributes:=WindowAttributes +[waStayOnTop]; // == this does - end -- As far as I understood,

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Micha Nelissen
Graeme Geldenhuys wrote: WindowAttributes are defined as follows: ... property WindowAttributes: TWindowAttributes read FWindowAttributes write FWindowAttributes; ... It's the same thing as mentioned before, FPC now guarantees you can change that into GetWindowAttributes function. If this

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Marc Weustink
Graeme Geldenhuys wrote: Hi, - snip -- Include(WindowAttributes, waStayOnTop); // == doesn't compile with FPC 2.3.1 WindowAttributes:=WindowAttributes +[waStayOnTop]; // == this does - end

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Daniël Mantione
Op Wed, 16 Jul 2008, schreef Graeme Geldenhuys: It compiles without issues under FPC 2.2.3 and prior. What is wrong with using Include() to add to a set? I do it all the time, plus WindowAttribute is a read/write property, unlike the compiler error in 2.0.4 where you could use Include()

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Daniël Mantione
Op Wed, 16 Jul 2008, schreef Daniël Mantione: 2.3 prevents you form taking the address of a property, because that way you can read/write its value directly, circumventing the getter/setter. So you cannot use the @ operator, but neither can you pass properties to var parameters. Include is

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Graeme Geldenhuys
On Wed, Jul 16, 2008 at 9:40 AM, Daniël Mantione [EMAIL PROTECTED] wrote: I think there can be two visions here: - Include is not a real procedure, so this internal implementation detail should be hidden and this can/should be allowed; the compiler internally should convert it into

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Michael Schnell
2.3 prevents you form taking the address of a property, because that way you can read/write its value directly, circumventing the getter/setter. So you cannot use the @ operator, but neither can you pass properties to var parameters. Include is an internal procedure that calls an rtl

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Daniël Mantione
Op Wed, 16 Jul 2008, schreef Graeme Geldenhuys: On Wed, Jul 16, 2008 at 9:40 AM, Daniël Mantione [EMAIL PROTECTED] wrote: I think there can be two visions here: - Include is not a real procedure, so this internal implementation detail should be hidden and this can/should be allowed; the

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Jonas Maebe
On 16 Jul 2008, at 10:01, Graeme Geldenhuys wrote: On Wed, Jul 16, 2008 at 9:40 AM, Daniël Mantione [EMAIL PROTECTED] wrote: I think there can be two visions here: - Include is not a real procedure, so this internal implementation detail should be hidden and this can/should be allowed; the

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Graeme Geldenhuys
2008/7/16 Jonas Maebe [EMAIL PROTECTED]: I think this would be ideal. Using Include() is much cleaner than set := set + [member]. And yes I understand that as it was implement, you could circumvent the getter/setter, but I believe it's something the compiler must handle correctly. Adding

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Martin Friebe
Hi, just to add another opinion. Personally, I would thing that it was nice to allow (write-able) Properties to any var-param (even out-param). Write-able include properties with a setter-procedure. IMHO the way it could be done would be for the compiler to create a temporary variable. This

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Peter Vreman
On Wed, Jul 16, 2008 at 9:40 AM, Daniël Mantione [EMAIL PROTECTED] wrote: I think there can be two visions here: - Include is not a real procedure, so this internal implementation detail should be hidden and this can/should be allowed; the compiler internally should convert it into

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Ales Katona
I think this is also same in Delphi, but I agree that passing pure properties (without getter/setter) to var should possibly be reduced to warning or even hint. Ales ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Daniël Mantione
Op Wed, 16 Jul 2008, schreef Ales Katona: I think this is also same in Delphi, but I agree that passing pure properties (without getter/setter) to var should possibly be reduced to warning or even hint. This was discussed before and rejected. The reason is that a change in implementation

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Jonas Maebe
On 16 Jul 2008, at 11:58, Graeme Geldenhuys wrote: OK, I understand you point over the long term. So would the following still be okay? set += [member]; Not that I ever use the C style operators like '+=', but it does act as nice shorthand for code - replacing the need for Include(). It

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Jonas Maebe
On 16 Jul 2008, at 12:16, Martin Friebe wrote: IMHO the way it could be done would be for the compiler to create a temporary variable. This could be passed in as var/out-param, and then be assigned to the property, using the proper setter-procedure. That results in semantics than a

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Graeme Geldenhuys
On Wed, Jul 16, 2008 at 2:43 PM, Jonas Maebe [EMAIL PROTECTED] wrote: OK, I understand you point over the long term. So would the following still be okay? set += [member]; Not that I ever use the C style operators like '+=', but it does act as nice shorthand for code - replacing the need