Hi all,
I have a pos printer that I drive with the jpos controller through a plugin.
Is possible to add to this controller three listeners and I would to assign a personal servoy function for each of they.
Each Listener implements “java.util.EventListener” and accept a specific event Object: ErrorEvent,outputCompleteEvent etc…
All these event objects have as father the “JposEvent” interface that has as father “java.util.EventObject”.
In fact I have made a class that implements these event interfaces and I’ve implemented the required function, if I rest into my plugin and I don’t interact with Servoy all works fine.
In my mind I have these generic ideas:
I have already managed these events so:
Can I pass a servoy-function controller through the plugin, declare a pointer (as class variable) into my Java plugin and use it to call the function (with .call method… or Am I talking abount two different thing?)?
OR
I woud follow this way l:
“new Packages.javax.swing.event.MouseInputListener({ mouseReleased:globals.myFunction});”
The problem, in this case, is that I don’t use a standard, already included, package but I import it from my plugins (maybe I don’t know something important…).
OR
does exist any other way?
Thanks
Marco