Casting an integer to an Object does not work

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

This is a possible approach to workaround the strict Pascal type check:

procedure TForm3.WebComboBox1Change(Sender: TObject);
var
o: TObject;
i: integer;
begin
o := webcombobox1.Items.Objects[webcombobox1.ItemIndex];

asm
i = o;
end;

caption := i.ToString;
end;

procedure TForm3.WebFormCreate(Sender: TObject);
var
o1,o2: TObject;
begin
asm
o1 = 1;
o2 = 2;
end;
webcombobox1.Items.AddObject('abc',o1);
webcombobox1.Items.AddObject('def',o2);
end;