[fpc-devel] C style operator doesn't work with properties in 2.3.1
Martin Friebe
fpc at mfriebe.de
Thu Jul 17 11:41:10 CEST 2008
Or Add a Method to the target object. (as long as it is part of your
code base, or can be modified by you)
and then do
FDayList[itm.WeekDayNum].Rows[itm.Timeslot].AvailableSlotsInc(itm.CountSlots);
In the class that defines
property AvailableSlot;
you can add
procedure AvailableSlotsInc(n : Integer);
Same for include, exclude, and all the others.
Best Regards
Martin
Jonas Maebe wrote:
>
> On 17 Jul 2008, at 08:41, Graeme Geldenhuys wrote:
>
>> Simple one liners like the following:
>>
>> inc(FDayList[itm.WeekDayNum].Rows[itm.Timeslot].AvailableSlots,
>> itm.CountSlots);
>> or
>> FDayList[itm.WeekDayNum].Rows[itm.Timeslot].AvailableSlots +=
>> itm.CountSlots;
>>
>> now has to change to this ugly line...
>>
>> FDayList[itm.WeekDayNum].Rows[itm.Timeslot].AvailableSlots :=
>> FDayList[itm.WeekDayNum].Rows[itm.Timeslot].AvailableSlots +
>> itm.CountSlots;
>
> Or
>
> with FDayList[itm.WeekDayNum].Rows[itm.Timeslot] do
> AvailableSlots:= AvailableSlots+itm.CountSlots;
>
>
> Jonas
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list