I’m currently working on a shop-system and using a list view for my shopping cart (Warenkorb).
The added products are actors, i read their values to set the name of my shopping cart items (Warenkorb_Item) on the “event on list item object set” function.
This works completly fine.
My shopping cart item (Warenkorb_Item) has two buttons, one for deleting it from the shopping cart and one for viewing it in a seperate window. So every item object has its own text and two buttons.
Pressing the button is working and i can fire events, but i cant inform the list view (Warenkorb) that something happend from the action of the list view item (Warenkorb_Item) itself.
As i see it my problem is, i cant declare an event dispatcher onto the list view item (Warenkorb_Item) , because i only add actors to the list view but i never create a list view item (Warenkorb_Item) itself.
I dont want to pass a reference of the entire list of items to every single list view item, just so they can delete their own reference out of it and the list view updates everytime that happens.
Any ideas how to solve this?