Hello,
I’ve just created a CustomControl which I can add to a Node in the scene controller. In this control, I have 1 property. In the set method, I check the validity of the imput and I throw an IlligalArgumentException if it’s not correct. How do I set it up, so the SceneComposer actually does something with this exception?
[java]
public void setTemplate(String template) {
System.out.println("setting template " + template);
if (!categoryRoot.templateExists(new Template(template, null))) {
throw new IllegalArgumentException(“Template name " + template + " not found.”);
}
this.template = template;
}
[/java]
The thing is, I can’t see the System.out anywhere in the console either.
I’m trying to add debugging statements to my Control, but where can I find the output? I’m generating the debug info with System.out.println statement.
All exceptions are shown in the SDK, either through a windows with the title “Error in Scene” or through a small warning sign in the lower right.
Ok, cause I managed to fix the problem with the error not being triggered. Simple case of 1 = in an if statement…
[java]
if (result = true)
[/java]
instead of
[java]
if (result == true)
[/java]
And now I can see I can get at the actual error through the icon in the bottom right. I can live with that, since it’s obvious something is not right when your change is undone the moment you press Enter.
yeah, figured that out myself, and fixed it, I now do just the
[java]
if (result)
[/java]