How to create a new event definition

I finally got around to making the project.
Thankyou Markus Winter. The project was invaluable. When things were awkward, I knew there was hope.
In reference to [quote]making a custom event handler[/quote] and what it didn’t explain.
Michelle Bujardet had:

[quote]I drag CustomCanvas to my window
I go Insert / Event handler, and add myevent
I open myevent and add code (beep)[/quote]

  1. Dragging the custom object didn’t make sense, Changing the Super for the object, in my case a textarea, does make sense.
  2. I wasn’t expecting to just add an eventhandler, since I was adding an eventdefinition. It took a few times to realize that was the next step.

My custom textarea: MyTextArea

I am still missing something after reading all your comments and tried many things.

I have a Webcontainer called “ClientList_CCtrl” which is included in WebPage1as Client_CCtrl1.
In Clientlist_CCtrl, I have a Weblistbox and a Webbutton to add a client if not in my list.

My goal is to open (or show) ANOTHER Webcontainer (OtherWebContainer) in Webpage1 when pressing Webbutton in Clientlist Web container.

I put in the Action Event Handler of the button in ClientList_CCtrl,
I put under Event Definition in the Webcontainer ClientList_CCtrl (tried to put parameter, but got error message),
I put in methods of WebPage1 with “OtherWebContainer.visible = true”.

but I still don’t get it how to pass the action of the button of ClientList_CCtrl to ClientList_CCtrl1 in WebPage1.

Any enlightenment is welcomed.

Thanks for your help

I cannot help you with this, because i deal with desktop. Maybe another poster can. I can say i was successful though

Let me know, by replying, if you want me to try to look at this.

Here’s an example for how to create an Event Definition that passes a property along through the event in Web:
https://www.dropbox.com/s/w14obt7tai6j4nt/EventDefinition_Web.xojo_binary_project?dl=0

Thanks for the example Tim.
I have a lack of concentration tonight.
I will look closely tomorrow morning to figure out how to open another web container instead of text.

Thanks Tim & Arthur,

Finally found my error: did not understand from the beginning that the goal of “Event definition” was to add a “custom” event handler to be used elsewhere… Thanks for your example Tim.