Failed to create a button
My goal is to create a button within the concept editor, that triggers some concept behavior.
I've added to my structure model the "imported model": JDK/javax.swing@java_stub, created the class extends the JButton and takes a node as a constructor argument. I'm going to add the button click handler that will call the concept behavior method.
I'm failed to make the language when the class constructor takes the parametrized node: node<AliasMap> node (AliasMap – is a concept). When node isn't parametrized class compiled successfully, but of course I can't call the concept behavior. The error is: "cannot resolve required reference; role: 'concept' in output node [type] SNodeType <no name>"
What am I doing wrong?
Thanks,
Alexey
I've added to my structure model the "imported model": JDK/javax.swing@java_stub, created the class extends the JButton and takes a node as a constructor argument. I'm going to add the button click handler that will call the concept behavior method.
I'm failed to make the language when the class constructor takes the parametrized node: node<AliasMap> node (AliasMap – is a concept). When node isn't parametrized class compiled successfully, but of course I can't call the concept behavior. The error is: "cannot resolve required reference; role: 'concept' in output node [type] SNodeType <no name>"
What am I doing wrong?
Thanks,
Alexey
Please sign in to leave a comment.
new JButton(new LoadConceptAction(node));
The button was created, but when I click it the exception occurs:
Any suggestions?
Thanks,
Alexey
Then if found something called Command.
I don't know where it is exactly.
But i had to wrap my code that changed the model into a command (probably for the Undo/Redo stuff).
It looked like this
command {
node.blub = "...";
}
Regards,
Mihail
Btw: MPS is a very powerful software but there is a huge lack of documentation. And furthermore the search function of this forum is really bad. It would be nice If the developers could try to improve things in this area.
In my current, very simple case I just create a button for a JFileChooser dialog, which selects the value for a string property.