I was trying to create data driven button menu. In button widget, the buttons was suppose to fire their respective task (like setting up particular texture) so i was using event dispatcher to send info to the menu widget. But the bind to the even dispatcher is only receiving the info of the finally created button (i.e. last index button).
This the button widget
Calling the event dispatcher, here when i press different button it prints their respective index number every time without fail . ( In Button Widget)
Creating dynamic buttons with the info from data table and displaying in uniform grid panel. ( In Main menu Widget)
To receive their respective Row name of the data table to set a image texture which is also save in the data table. (In Main Menu Widget)
Please can some one point out my mistake, or if u guys have other method it would really help me. What is the problem with the event dispatcher and why is it only firing when the last button is pressed. Is there any other alternative way to access the dynamically created button and assign different task to fire.
Thank you guys!!