Skip to main content

registerCallback don´t function

No replies

Hi gurus,
I have use "editorDemo.jdnc" and add some action named "hlaska" to toolBar. In my source code I have created public class "Posluchac" with method "hlaska" like in Example 1).
In application´s code I add callback Example 2)

ActionManager call mathod registerCallback() witch call method
BoundAction action = getBoundAction(id);

but everything values in ( private Map actionMap ) witch was generated by ObjectRealizer from .JDNC are of type

"org.jdesktop.swing.actions.TargetableAction" >>>

"action" isn´t of type BoundAction and NOT callback object was added

Example 1)
public class Posluchac extends org.jdesktop.swing.actions.TargetableAction {

/** Creates a new instance of Posluchac */
public Posluchac() { super(); }

public void hlaska(java.awt.event.ActionEvent e) {...}

Example 2)

org.jdesktop.swing.Application app = getApplication(ui);
ActionManager manager =app.getActionManager();
manager.registerCallback("hlaska", new Posluchac(), "hlaska");