Reputation: 166
I'm trying to import the com.gluonhq:charm:3.0.0 jar into SceneBuilder but for some reason I don't get a View container. I've tried loading the charm jar from the repository and from my local gradle cache. But I only get 22 items imported instead of the full 24 and no View.
I ultimately want to test an example "Gluon Mobile - Multi View Project with FXML" but can't load the corresponding FXML files into SceneBuilder because of the missing View container.
Thanks for any help!
PS. If it makes a difference I'm using OSX 10.11.5 (El Capitan)
Upvotes: 1
Views: 296
Reputation: 45476
As you may know, you don't need to go to the .gradle or .m2 local repositories, you can already retrieve the artifact from the online repositories:
Open the Library Manager and click Search repositories
, type 'charm' and click search. From the list of results, select com.gluonhq:charm
, and press 'Add JAR', and it will import the latest version (3.0.0 as of now), and you will find all the components. Click 'Import Components', and close the dialogs.
There is a known issue when importing jars, though, and some components won't be listed initially, as it happens with View
in the case of the Charm jar.
The good news is it doesn't mean they won't be included: If you close Scene Builder and launch it again, those missing components will show up under the Custom panel.
The issue is related to the way SceneBuilder scans a jar to find out which of all the classes are potential candidates to be custom controls. During that process, some valid controls like View
, may fail because some classpath conflict, so they won't be listed initially in the import dialog. But when you close SB and open it again, with a clean classpath, the jar is imported normally, and View
and the rest of the controls are added to the Custom panel.
Upvotes: 1