Re: [Lazarus] int64 assignment fails
That was it... many thanks to you and Flavio! -Tom On Sat, May 10, 2014 at 11:41 PM, leledumbo leledumbo_c...@yahoo.co.idwrote: http://wiki.freepascal.org/User_Changes_2.4.0#Treating_direct-mapped_properties_as_regular_fields -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-int64-assignment-fails-tp4036884p4036887.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 mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] int64 assignment fails
fpc-2.6.4-1.x86_64. says Argument can't be assigned to when trying to compile the following: type TickType = Int64; TimebaseData = record TicksFrequency: TickType; end; TEpikTimer= class(TComponent) private FHWTicks:TimeBaseData; Public property HWTimebase: TimeBaseData read FHWTicks write FHWTicks; TForm1 = class(TForm); public ET:TEpikTimer; procedure TForm1.Button8CLICK(Sender: TObject); begin ET.HWTimebase.TicksFrequency:=10; // Fails This used to compile and seems like a straightforward int64 assignment. Has something changed where this is no longer allowed? Thanks, -Tom -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] int64 assignment fails
On Sat, May 10, 2014 at 8:40 PM, Tom Lisjac zikon...@gmail.com wrote: fpc-2.6.4-1.x86_64. says Argument can't be assigned to when trying to compile the following: type TickType = Int64; TimebaseData = record TicksFrequency: TickType; end; TEpikTimer= class(TComponent) private FHWTicks:TimeBaseData; Public property HWTimebase: TimeBaseData read FHWTicks write FHWTicks; TForm1 = class(TForm); public ET:TEpikTimer; procedure TForm1.Button8CLICK(Sender: TObject); begin ET.HWTimebase.TicksFrequency:=10; // Fails This used to compile and seems like a straightforward int64 assignment. Has something changed where this is no longer allowed? Thanks, -Tom Yes, this used to compile, but was changed/fixed in FPC 2.2 or something - I guess because of the property contract: code shouldn't break if you change your property to have a getter instead of direct field access. Best regards, Flávio -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] int64 assignment fails
http://wiki.freepascal.org/User_Changes_2.4.0#Treating_direct-mapped_properties_as_regular_fields -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-int64-assignment-fails-tp4036884p4036887.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