Signal returning object I cant access

Godot Version



my code was working in version 3. am trying to return id of button pressed. button created procedurally I set the id.
out put now is [@Button@25:<Button#36758882003>] and am looking for 25

func genButtons():
	for i in numberOfNotesInDisplay:
modeNotes[i].connect("pressed", _button_pressed.bind([modeNotes[i]]))

func _button_pressed(button):
	var pressedButtonText = button

output is [@Button@25:<Button#36758882003>] in version 3 I used button.text in my function. and 25 was the output.

Is “i” the value that you want and not modeNotes[i]?

no I want the value that nodeNotes[i] contains. the value was added by modeNotes[i].setCellNumber(i).

Then you probably want


or whatever you called the function that gets you the cell number.

1 Like

how could I engage the button with ‘mouse hover over button’ by pressing a ‘w’ key on keyboard

yes this is my button modeNotes[i].???

Sorry, I don’t understand what you’re asking.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.