Create Codename One Form in Maven - codenameone

I migrated my project to Maven and noticed that right click -> New -> Codename One Resource file/Container/Dialog/Form is not there anymore.
This is what I have now:
Where did it move?
Thanks a lot.

There is a maven goal for this but it isn't exposed in the GUI.
https://shannah.github.io/codenameone-maven-manual/#create-gui-form
Basic usage:
mvn cn1:create-gui-form -DclassName=com.example.MyForm

Steve's answer is correct, but note that com.example.MyForm part must be in quotes "",
mvn cn1:create-gui-form -DclassName="com.example.MyForm"
Otherwise there will be an error.

Related

The Angular Universal (SSR) cannot integrate with the external libraries like puppeteer, bulljs

This is just for describing the issue and sharing my solution, I got stuck a lot of time on it.
This issue happened after I upgraded the Angular 10 -> 11 and changed the builder from udk:udk-runner to #angular-devkit
The issue I was facing is when I set the field bundleDependencies in angular.json to true . The Puppeteer cannot start with the error cannot launch the browser
Then I found it also happened on the other external libraries I'm using at the Server side like BullJS Bull-Board Puppeteer-Cluster with the below error
Github source for demo the issue: https://github.com/phattranky/angular-ssr-error-with-pupepteer
The solution is quite simple you just need to add externalDependencies below the field bundleDependencies, which are the libraries we are using.
"externalDependencies": ["puppeteer", "puppeteer-cluster", "bull", "bull-board"]
Sample:
What is the externalDependencies ?
https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/builders/server/schema.json
If you have the better solution and any feedbacks, please share for me. Thanks

team work with codename one

i am a student and i am a member of a group of five...
We have to work in the same project using git and we are using Scrum method in our work, so , we need some guide and best practice and answers before starting...we will be so happy with your informations.
can we use différent IDE (intellij and Netbeans)... if yes, the .gitinore file will contains every IDE 's specefic .gitignore file?
You can use this to get started: https://www.codenameone.com/blog/tip-using-git-for-codename-one-projects.html
e.g. sample gitignore from https://github.com/codenameone/MaterialScreensUIKit
*.jar
nbproject/private/
build/
nbbuild/
dist/
lib/CodenameOne_SRC.zip
psds/.DS_Store
.DS_Store
In your theme editor make sure the File -> XML Team Mode is checked for everyone so you can work on XML and individual files rather than the whole thing.
Alternatively you can avoid the designer tool altogether and use CSS.

Integrating Android .aar lib

I'm trying to integrate the cwac-cam2 library with codenameone. The lib is in .aar format but when I build it fails whith the following error:
org.gradle.process.internal.ExecException: Process 'command '/home/ec2-user/android-sdk/build-tools/23.0.1/aapt'' finished with non-zero exit value 1
I can not find out what is wrong. Can you help me please?
Lib reference: https://github.com/commonsguy/cwac-cam2
Its a bit difficult for me to say what exactly wrong is, but you can try some general steps that I would follow like
1) Check your .aar lib is residing at appropriate location. Normally for Android it will be at ..\YourProject\native\android\YourLib.aar
(also do 'Refresh cn1lib files' once, because I did so.. lol)
2) check build hint and make sure you have
android.enableProguard = false
3) If you are using any activity from that .aar lib then make sure you have added those activity/ies in build hint as android.xapplication = <activity android:name="com.XX.YY.MyActivity" />
I would further suggest you look at Chen's post on ARR integration here: http://www.codenameone.com/blog/integrating-android-3rd-party-libraries-jni.html
Also notice that gradle builds are often harder to work with in terms of result readability. I would suggest trying to disable gradle first and getting it to work without it then re-enabling it so you can test with android studio if necessary. You can disable gradle with the build hint android.gradle=false.

Class 'SqlFormatter' is missing CAKEPHP 3 DebugKit

I've just installed the latest Debugkit from https://github.com/cakephp/debug_kit.
Everything is working. However, when I clicked on the "SQL Log", the CakePHP logo keeps spinning. I tried to debug by opening up the console.log and saw an 500 error. It shows the below.
Error: Class 'SqlFormatter' not found
File /Applications/MAMP/htdocs/App/vendor/cakephp/debug_kit/src/Template/Element/sql_log_panel.ctp
Line: 24
From my understanding, SqlFormatter class is not found in sql_log_panel.ctp. How can I add/declare the SqlFormatter class?
Just install it via composer, problem very likely solved then.
https://getcomposer.org/doc/00-intro.md
http://book.cakephp.org/3.0/en/installation.html#installing-cakephp
I highly recommend you to become familiar with composer, it is a standard tool for php developers for some time now. Composer will automatically install the dependencies for you.
Your second best option would be to download the SqlFormatter package manually from where ever it comes from and set your autoloading or include manually up.

AngularJS plugin for WebStorm

I am using AngularJS with WebStorm, and my question is:
How do I add the AngularJS plugin for intellisense keyword for the AngularJS directives in the JetBrains WebStorm?
These links may help you:
http://plugins.jetbrains.com/plugin/6971
http://blog.jetbrains.com/blog/2013/04/02/mastering-webstorm-for-angularjs-youtube-livestream-event-tuesday-april-9/
https://github.com/johnlindquist/angularjs-plugin
https://groups.google.com/forum/#!topic/angular/c_suah3j0Xc
http://pkozlowskios.wordpress.com/2012/07/15/live-templates-for-angular-js-in-webstorm/
Here is simple Steps to add Angular Plugin
Step 1 : Just download the JetBrains WebStorm plugin from http://plugins.jetbrains.com/plugin/6971
Step 2 : Goto the WebStorm File->Settings->IDE Settings->Plugins
Step 3 : Click Install plugin from disk and select the zip files
Step 4 : Restart the WebStorm
You are done :)
John recommends not to do it any other way than his but his instructions are as always a bit terse. I found this to be a much better guide. It repeats what john suggests. Note that this step is easy to miss if you dont remember to scroll:
Navigate to the bottom of the panel and select the “Browse Repositories..” button. This spawns a new window. Double click on the Angular.js plugin

Resources