Doug Sisco
Doug Sisco

Reputation: 161

CodenameOne GUI Builder XML and Open/Save

Overall I have found the GUI Builder to be a useful tool for creating forms. However it is non-intuitive, clunky, overly complicated and extremely slow to launch.

I have found that the best way to edit a form is to start with the GUI Builder but then edit the XML directly.

The problem is that the XML can easily get corrupted, and when that happens the GUI Builder just hangs. There seems to be no way to debug the XML, and opening the GUI Builder takes about 40 seconds. And if the file is corrupt, the GUI Builder just doesn't open at all. I cannot find any place to view the XML errors so I am left with just going back to the previous edit and trying again. An XML guide would really help.

I have three questions about the CodenameOne GUI Builder:

  1. Is there a reference guide for the GUI Builder XML .gui files?

  2. Is there any place to view .gui file XML errors when the GUI Builder attempts to load?

  3. There doesn't seem to be any way to close a .gui file and open another one (or reload the current file) from the GUI Builder without closing it first. Is this feature going to be added in the future?

Upvotes: 1

Views: 52

Answers (1)

Shai Almog
Shai Almog

Reputation: 52770

There's no reference guide to the GUI file format but the format itself is trivial. Names of the classes, values of properties, etc.

The maven generate-gui-sources target might be useful for you to validate the GUI files. It might also provide better error messages since its process of XML parsing/generating differs from the one in the GUI builder. I don't know if it will be faster for you as on my machine the GUI builder launches fast.

We designed the GUI builder for opening from the IDE so we didn't plan an "open" feature. I'm not sure if that would be practical to add since there's a lot of shared state that might cause an issue.

Upvotes: 0

Related Questions