[Lazarus] TDateEdit.Date is not published...why?

Graeme Geldenhuys graemeg.lists at gmail.com
Fri Apr 24 12:32:28 CEST 2009


On Fri, Apr 24, 2009 at 12:01 PM, Gerard N/A <gerardusmercator at gmail.com> wrote:
>
> I don't get it. Why would you add USD and GBP and assign the result to
> a variable wich is supposed to hold Euros?

Think in terms of an accounting application that supports billing in
multiple currencies. Or clients that pay there bills in there own
currency, while the default currency is something else.


> Ok, maybe the name "currency" can be confusing. Curency is a fixed
> point real type with 4 decimal places.
> Anyway, handling conversions between currencies requires more than
> even a simple class.

Exactly my point.  :-)

> You would need to know at least what is the exchange rate for a given
> conversion.

And the currency type and the rounding method use (maybe even per
currency) and the preferred decimal numbers used (again maybe per
currency) etc...

Something that seemed so simple in the beginning can become quite a
complex task. ;-)

Now similar issue can be applied to TDateTime and String types.  All I
can say is thank goodness for Value Type Frameworks which get around
these problems. Business objects are defined using class types instead
of simple types.  Anyway, this thread is getting a bit off-topic now.

Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the Lazarus mailing list