matthiasblaesing commented on issue #9040: URL: https://github.com/apache/netbeans/issues/9040#issuecomment-3576804956
This makes no sense. For your example: > Try to point two diffrent events (focusgained, mouseover) to the same eventListenerFunction. The two event listeners have nothing in common. `focusgained` receives a `FocusEvent` and `mousemoved` (there is no `mouseover`) receives a `MouseEvent`. You can assign the same listener as long as the signatures are identical. See this example: <img width="538" height="515" alt="Image" src="https://github.com/user-attachments/assets/ad204eab-21c4-4144-a391-c11cf8e1426f" /> Here 9 events are handled by two callbacks. The code that rejects your selection is here: https://github.com/apache/netbeans/blob/d34a6fe5ed993b2c0b9c7faffc4490132bdb2c03/java/form/src/org/netbeans/modules/form/FormEvents.java#L323-L349 - Types of the parameters of the listeners - Return type of the listener must be equal. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
