I am calling a function that is linked to the onAction of a button element. Since this method is dependent upon an event to get the form name, element name etc, I am creating a new JSEvent object and passing it to the function.
I tried to add the form and element name directly to the object with something like, event.setFormName or event.form = myFormName. This would allow me to use the Servoys native commands to retrieve this value from the object. The only way I could find to do this was to use the event.data object. This will work, but adds additional code in the receiving method to use the actual event properties or the event data object.
Is there another way to populate the properties in the native event object?
Here is the code using the data object.
//queue click on button
var _newEvent = new JSEvent();
_newEvent.data = new Object();
_newEvent.data.formName = _form;
newEvent.data.elementName = _associatedButton;
globals.comm_popup_openPopup(_newEvent)
Thanks in advance,
Lenore