I have a TWebComboBox in which I want to add key-value pairs. Normally I would cast the key ID (integer) to an Object and then call the method add (Value, KeyObject);
However, casting an integer into an Object fails in Webcore/PAS2JS. It says it cannot cast a Longint to an Object. Stackoverflow hints the value should be converted to a 32 bit value by using PtrUint. But I still get the message [Error] UFWarmeldaViewer.pas(194): Illegal type conversion: "NativeUInt" to "class TObject".
So question: How can I put an Integer as an Object (Keyvalue) into a TWebCombobox?
Best
Peter