Can't import View container for charm library 3.0.0 in Scene Builder - scenebuilder

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)

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.

Related

JavaFX Projects gone?

I have been trying to find a place to download the plugin, allowing the creation of JavaFX projects, but without success.
I have installed the newest Java SDK8u65-windows-x64 but it doesn't support JavaFX Projects, or at least I couldn't figure how to create one!
Does anyone know if they have temporally taken the url's where we used to be able to download JavaFX plugins from, or is it only me, who can't find them on the Oracle website?
Thank you !
EDIT: The problem was, that I was using Eclipse Mars, which for some reason doesn't allow to auto import JavaFx, as it has some odd access restrictions on the JRE system library. How I solved it was I installed the e(fx)clipse plugin and I was able to import javafx components successfully after that!
You can develop JavaFx straight away if you are using intellij Idea and perhaps some other ides
But if you are using eclipse, you should install the e(fx)clipse for your version.
Try this link
Also if you have more than one JDKs on your system, try to use jdk 8 an the default
Right click your project > properties
Then elect “Java Build Path” on left, then “JRE System Library”, click Edit…
Select "Workspace Default JRE"
Click "Installed JREs"
Check out the list and select jdk 8....
If you don't see it, click Search…, navigate to your jdk8 path, then click OK
Now you should see all installed JREs, select the one you want
Click OK

How to import the QML-Book examples into QT Creator 3.4.0?

How can I import these code examples into QT Creator 3.4.0 ? I tried the available import options but they don't work.
I tried to create an empty QML project and add the rectangle.qml file to it. When I tried to run it, nothing showed up.
The book examples contain files .qmlproject - which seems to be a project descriptor. I wonder if it is somehow possible to import these .qmlproject files into QT Creator, click and run the examples.
I think this link might help in finding the solution : https://forum.qt.io/topic/27525/what-is-qmlproject-file/3 .
Usually I'd say that you should go to File > Open File or Project... and select the .qmlproject and you're done, but support for this type of project file was disabled by default. If you try to do this now (I believe the change is in Creator 3.4), you'll just get an error message about Creator not supporting the mime type of the file, or something. Unfortunately, this is not a very useful error message for a beginner, and it won't tell you how to fix the problem.
If you want to use .qmlproject files in newer versions of Creator, you have to navigate to Help > About Plugins... and enable the QmlProjectManager plugin (it's under the Qt Quick section) by checking the box.
So this is how you should normally open project files in Qt Creator. As for the window not showing up, that's also commonly encountered and can be fixed by making the root item in your scene a Window:
Unlike QQuickView, QQmlApplicationEngine does not automatically create a root window. If you are using visual items from Qt Quick, you will need to place them inside of a Window.
Qt Creator's new project wizard handles this for you when you create a new Qt Quick project, as you saw when you got the "Hello World" window to open in your video. It was when you loaded concepts/rectangle.qml which had a Rectangle as its root item, that it stopped showing up. That QML file was likely used in a project where a QQuickView was displaying it.

android studio adding extern jar library

I would like to add the extern jar library commons-jexl-2.1.1.jar. I copied the jar into the libs/ folder and performed the Add as library... menu point. I don't receive any errors in the code and everything seems to work but when compiling and starting the application I receive the error java.lang.NoClassDefFoundError: org.apache.commons.jexl2.JexlEngineon this line private JexlEngine jexl = new JexlEngine();
Does anyone know what I've missed?
Unfortunately, that menu command is doing the wrong thing for Gradle-based projects, which I assume yours is. (Gradle-based projects are what you get when you create new projects in Android Studio). I've filed bug https://code.google.com/p/android/issues/detail?id=62249 to request implementing this menu command properly for these projects, or at a minimum disabling it until it's implemented to prevent confusion.
In the meantime, you can add external JAR dependencies by going through the Project Structure dialog, which will add the appropriate entries to your build.gradle build file. Choose File menu > Project Structure, and click on the "Modules" entry on the left. Choose your module from the middle list, and click on the Dependencies tab on the right. Then click on the + button at the bottom to add a new dependency. Screen shot here:
The + menu has an option for "File dependency" (pictured). You will get a file chooser that will let you select the jar file.
If your dependency is one that can be found in Maven, you may find it more convenient to specify the Maven coordinates; that way, the build system will automatically download the dependency, and you won't have to download and store the JAR manually. To set that up, choose "Maven dependency" from the + menu. You'll get a dialog where you can search to find the proper Maven coordinates for your library. In your case, those coordinates will be "org.apache.commons:commons-jexl:2.1.1#jar"
If you prefer to edit build files by hand, check out your build.gradle file after completing the Project Structure dialog changes to see what it did.
The docs for using Gradle in Android are at http://tools.android.com/tech-docs/new-build-system
courtesy The App Chaps
I've been struggling with the same thing for many hours, trying to get the Gson jar to work no less. I finally cracked it – here are the steps I took:
Put the Gson jar (in my case, gson-2.2.4.jar) into the libs folder
Right click it and hit 'Add as library'
Ensure that compile files('libs/gson-2.2.4.jar') is in your build.gradle file
Do a clean build (you can probably do this fine in Android Studio, but to make sure I navigated in a terminal to the root folder of my app and typed gradlew clean. I'm on Mac OS X, the command might be different on your system
After I did the above three, it started working fine. I think the 'Add as library' step was the one I'd previously missed, and it didn't work until I cleaned it either.
[Edit - added the build.gradle step which is also necessary as others have pointed out]

How to select debug/release mode in Xcode4? [duplicate]

Build for debug is just press on the PLAY symbol, but I don't know how to Build for distribution/release?
The short answer is:
choose the iOS scheme from the
drop-down near the run button from
the menu bar
choose product > archive in the
window that pops-up
click 'validate'
upon successful validation, click
'submit'
You can use command line tool to build the release version. Next to your project folder, i.e.
$ ls
...
Foo.xcodeproj
...
Type the following build command:
$ xcodebuild -configuration Release
The "play" button is specifically for build and run (or test or profile, etc). The Archive action is intended to build for release and to generate an archive that is suitable for submission to the app store. If you want to skip that, you can choose Product > Build For > Archive to force the release build without actually archiving. To find the built product, expand the Products group in the Project navigator, right-click the product and choose to show in Finder.
That said, you can click and hold the play button for a menu of other build actions (including Build and Archive).
XCode>Product>Schemes>Edit Schemes>Run>Build Configuration
They've bundled all the target/build configuration/debugging options stuff into "schemes". The transition guide has a good explanation.
I have a large app that was having problems uploading to the AppStore using the archive method you will find in XCode 4. The activity indicator kept spinning for hours whether I was trying to validate or distribute, so I created a support ticket to Apple. During that process, I found out you could right click on the .app in your Products folder inside the Project Navigator of XCode, and compress the app to submit using the Application Loader 2.5.1. (aka the old method). Only the Debug - iphoneos folder is accessible this way (for now) and once Apple responded, this is what they had to say:
I'm glad to hear that Application Loader has provided you a viable workaround. Discussing this situation internally, we're not sure that submitting the Debug build will pose too much of a problem (so long as it was signed with the App Store distribution profile, as you mentioned it was). The app will likely be slower as the debug switches are turned on and optimizations are turned off for the Debug configuration, though it will still run. App Review will ultimately determine whether or not that's ok, as I'm not sure that's something they check for. You could try reaching out directly to App Review to confirm this, if you wish. However, since App Loader is working for you, I do recommend rebuilding the app with your Release configuration and resubmitting to play it safe. To find your Release build in Xcode 4.x, control-click on the Application Archive on the Archives tab in the organizer, and choose "Show in Finder." Then, control-click on the .xcarchive file in Finder and choose "Show Package Contents." The release built .app file should be located within the /Products/Applications folder.
This was very helpful information for developers who are having problems with the archive method, and my app is now uploading successfully without any concern that it won't run to the best of it's ability.
To set the build configuration to Debug or Release, choose 'Edit Scheme' from the 'Product' menu.
Then you see a clear choice.
The Apple Transition Guide mentions a button at the top left of the Xcode screen, but I cannot see it in Xcode 4.3.
That part is now located under Schemes. If you edit your schemes you will see that you can set the debug/release/adhoc/distribution build config for each scheme.
Product -> Archive, later, press the distribute button and check the option Export as Application or what you want

Flex builder 3 word completion/intellisense stopped working for new variables

For some reason code completion/intellisense has stopped working for new properties in
our projects.
These are the symptoms:
Add a new property to a class
If you go to a different class, and you try to use that property, the intellisense dropdown doesn't show the new property. It does show the already existing ones.
If you build the project, everything works fine, there are no errors or compiler warnings.
The property will not show in intellisense until you restart Flex Builder (version 3).
We have tried it on different machines and als tried to set up the workspace again, but the symptoms stay the same everywhere in our project.
Anyone who has seen this behaviour before and any tips on how to resolve this?
Thanks
I see this behavior while flexBuilder is "Building WorkSpace" and "Refreshing WorkSpace" which, on large projects can take a few minutes sometimes. Flex builder by default builds your workspace every time you save some changes or launch/debug a project.
If you don't have "Build Automatically" checked under the "Project" menu, then your workspace will not be built with each save and you will not see your new properties until it is built, which won't be until Flex builder restarts.
The problem was that I was using a non-localized resource bundle that I had placed in the source folder of my project. In the compiler I added the source path "src" to the Flex Build Path settings, which is also the main folder of the source code.
This caused the problem. I have now moved the resources to another folder outside the src folder and configured the compiler accordingly. Flex Builder works all fine again.

Resources