SDK Scene Editor

When I create a scene and edit it. I click on the “Node” I wanted and right click on it and click on “add custom control”. The dialog shows a list of class that it find. I click on my “DoorControl” abstractControl class. and then the SDK comes up with “Error instantiating class”

Yeah, There is a misspelling on “Instantiating” it say “instatiating”

What does this error mean? The project builds and runs. but what is the SDK looking for that it doesn’t have.

1 Like

I think the message comes from line 119 of NewCustomControlWizardAction.java:

However, I don’t know the SDK well enough to guess what the root cause might be.

Edit: Does your DoorControl have a no-argument constructor?

I thought of that and created one and still not able to do it.


public class DoorControl extends AbstractControl
{
	public DoorControl()
	{
		super();
	}
	
	public DoorControl(MOVEMENT movement)
	{
		super();
		this.movement = movement;
		state = STATE.IDLE;
		running = false;
        }
.....
}
1 Like

If I could reproduce this, I imagine my next step would be to run the SDK under a debugger. Or maybe build a custom SDK with print statements in NewCustomControlWizardAction.

I just did a “Save as” on the file and then it started working on the file.

THen the old file still had an issue. So I deleted everything and clicked save. and then copied everything from the “Save as” file back to the original and saved it and it worked.

Most have been a weird quirk in Netbeans.

I guess that’s related to netbeans “Compile on Save”, so you indeed need to save the file so it’s re-compiled and then loaded into the SDK.

May be worth to create an issue for the SDK to either throw a more specific error or show a grayed out control in case the correct constructor is missing