I have an object defined as follows:
type
TcolourScheme = Object
fg: TColor;
bg: TColor;
And I'm creating instances of the object as follows:
var
blackOnWhite, whiteOnBlack: colourScheme;
All working good so far, but I'm initialising these objects as follows:
blackOnWhite.fg:=clBlack;
blackOnWhite.bg:=clWhite;
Is there any way to initialise these in a single command, I cannot figure out the syntax to do this at all?
I thought I maybe needed to use a 'setter' procedure, but couldn't figure out the syntax for that either as I was getting errors that I'd defined the setter procedure twice.
Can the object be initialised in a single command? And are 'setters' and 'getters' relevant in pascal?
Thanks,
FM