Accessing the clipboard in a Firemonkey application

It just took me quite a while to find this information so I'll put it here for future reference. A Firemonkey application can not just access the clipboard, it needs to ask the platform whether it actually has one, then get the service interface and use that. uses Fmx.Platform; [...] function TryGetClipboardService(out _clp: IFMXClipboardService): boolean; … Continue reading Accessing the clipboard in a Firemonkey application

Note to self: Do not use double quotes around field names

Note to self: If MS Access adds double quotes to field names in queries, do not use them! It won't complain about them (You'd wish it would), but it just won't work. So if you see something like: SELECT * FROM t_Mst_Tageserfassung WHERE ("TeMitarbeiter"=92) AND ("TeArbeitstag"=#12/24/2014#); Remove the quotes and it will start to work … Continue reading Note to self: Do not use double quotes around field names

class as interface: Operator not applicable to this operand

Once in a while I run into this problem and every single time it takes me forever to remember the cause: Say, you have got an interface and a class implementing that interface: type IMyInterface = interface function asMyInterface: IMyInterface; end; type TMyClass = class(TInterfacedObject, IMyInterface) private function asMyInterface: IMyInterface; end; [...] function TMyClass.asMyInterface: IMyInterface; … Continue reading class as interface: Operator not applicable to this operand