codenameonegui-builder

Codenameone new Gui Builder can't add components


I started using the CN1 new Guibuilder for the first time today and can't fathom out how to add components. I have watched and read the tutorials but my system isn't behaving the same.

I create a new CN1 project and the 'Form' guibuilder class, right mouse click > Guibuilder > the builder IDE opens fine and looks visually correct. On the right hand side panel i select any component, eg. Label, and as i am dragging onto the canvas it looks as per the tutorial - the handles and height/widths properties visible - see enter image description here. I release the mouse button and it leave a grey box enter image description here

If i click on the grey box (or try to add any component) it disappears enter image description here

Wierdly if i click and drag and at the same time click the PrintScreen button, the label sometime stays on the canvas with the handles and i can see its properties panel, but when i try and change a property, the Label vanishes.

Basically if i try and change anything in the builder, including clicking one the Layouts (bottom left panel) for the GuiForm then the builder seemingly rebuilds itself and collapses and hides anything i have open - resetting itself back to when it was first opened. It's like its in a read-only mode.

Is there a log i can look at? I am not getting any error in my console. Eclipse is running normally in all other areas. I'm on the latest JRE and Eclipse Neon.3 and latest CN1 updates.

EDIT 12/11/17 The name value in the guibuilder.input is empty:

`<?xml version="1.0" encoding="UTF-8"?>
<con name="" formName="GuiForm"  file="file:/C:/VersionControl/sandpit/GuiBuilderTest1/res/guibuilder/com/thinksmart/guibuilder2/GuiForm.gui" javaFile="file:/C:/WINDOWS/system32/GuiBuilderTest1/src/com/thinksmart/guibuilder2/GuiForm.java" resFile="file:/C:/VersionControl/sandpit/GuiBuilderTest1/src/theme.res" outputFile="file:/C:/Users/William/CN1_Home/.guiBuilder/3979cc5c-798a-41b4-9bda-d7824141986a.ouput" running="file:/C:/Users/William/CN1_Home/.guiBuilder/3979cc5c-798a-41b4-9bda-d7824141986a" />`

The GuiBuilderTest1/codenameone_settings.properties file for this brand new project is:

`codename1.vendor=CodenameOne
codename1.displayName=GuiBuilderTest1
codename1.icon=icon.png
codename1.arg.java.version=8
codename1.languageLevel=5
codename1.secondaryTitle=GuiBuilderTest1
codename1.version=1.0
codename1.mainName=MyApplication
codename1.ios.certificatePassword=
codename1.arg.ios.newStorageLocation=true
codename1.rim.signtoolDb=
codename1.ios.certificate=
codename1.j2me.nativeTheme=nativej2me.res
codename1.android.keystorePassword=
codename1.rim.signtoolCsk=
codename1.android.keystore=
codename1.android.keystoreAlias=
codename1.rim.certificatePassword=
codename1.ios.provision=
codename1.packageName=com.thinksmart.guibuilder2`

The CN1Log file also has the name attribute as ''.


Solution

  • I think I've been looking at this in the wrong direction. I think the problem isn't a permission problem but a naming problem. It seems that the project name is blank for some reason which I didn't think would be an option but I guess it is.

    The project name should come from codename1.displayName in codenameone_settings.properties. I'll add a fix for this to work with "UnnamedProject" for version 3.81.