Raise a Event and Catch a Event multiple

i have a window with a list and one entry i can edit in a new window.
this edit window have a container control with a event “AfterSaved”

if me open this new edit window i try to use the add handler in the list window but i got a exeption there
“Attempting to add a handler for an event that was already handled.”
i will handled it where i want and so often i want.

AfterSaved is also used in the Edit Form self, the ContainerControl send it to his Window so the Window will be closed there.

exists something like global events?
example: i can raise a event “Hello” with arguments somewhere and all other places can receive this?

If you have implemented the AfterSaved event in the window, you need to re-raise the event in your AfterSaved code.

sub AfterSaved()
    // do some stuff before forwarding the event to the outside world
    RaiseEvent AfterSaved
    // do some stuff afterward
end sub

The event system gives you precise control over when in your code the additional handler code will execute.

thanks, i will play with it soon at next day

i guess your meaning was a new event definition with the same nane in the edit form where the container control is placed?

now i used a extra event definition only for my list update in the container control that i can use add handler in the window with my list. it was not my intend but it works.

For reference, please see this thread. https://forum.xojo.com/20267-delegates-events-and-objects-oh-my/0