itemList select signal not working in code?

Godot Version

Godot Version 4.2

the signal “item_selected” is not working ?


	var itemLlist1 = ItemList.new();
	itemLlist1.item_selected.connect(self.item_list_item_selected);


func item_list_item_selected(index):
	print(index);

In this example using a button the signal “pressed” is working fine

	var btn_Up = Button.new();
	var btn_Up.pressed.connect(self.btn_Up_pressed);

func btn_Up_pressed():
	print( itemLlist1.get_selected_items ( ) )

fixed…

i had this on the code:

itemLlist1.select_mode = 1;

the signal is multi_selected

	itemLlist1.multi_selected.connect(self.itemLlist1_selected);


func itemLlist1_selected(index, selected):
	print(  str(index) + str("  ") + str(selected)   );

this gives multiselection