How do I migrate an older theme contribution to Qooxdoo 6.0? - qooxdoo

I've recently been asked whether it was possible for me to convert my older theme contributions to the new Qooxdoo packaging system. So I installed Qooxdoo 6.0 and got a first test app running - not without problems because the instructions in the official docs are a bit buggy (e.g "npx qx" is an unknown command with my Ubuntu 18.04). I also read about the packaging system and what to do to install one of the existing packages from the Qooxdoo repository.
Then I followed the steps described in section "Create a new package". This procedure resulted in a folder structure which looked familiar at first sight, but a closer look made me wonder: There are two resource folders now, one is under "source" (as I would have expected) and the other one is under "source/class/[mypackage]". I also noticed that there is a "demo" folder in "source/class/[mypackage]", which used to be a top-level folder in previous Qooxdoo versions.
I then copied the theming files of my contribution to "source/class/theme", the demo app files to "source/class/[mypackage]/demo" and the demo resources to "source/class/[mypackage]/resource". After compiling the project I managed to run the demo app, but only without the expected resources (no icons, no fonts, no background images). The theming as such appears to be applied properly, but I keep getting plenty of error messages telling me "404 (Not found)" and "Image could not be loaded".
What am I doing wrong?

I guess you are running into a bug with our template for packages ... please open an issue https://github.com/qooxdoo/qooxdoo-compiler/issues/
As for how to do it. Have a look at an actual theme package for 6.0 https://github.com/ITISFoundation/qx-osparc-theme there you can see the required structure.
Also, for this kind of question, interactive help is probably best. Visit the qooxdoo chat on https://gitter.im/qooxdoo/qooxdoo

Related

How do I view assets and layer info in Origami studio?

Following this tutorial: http://origami.design/tutorials/common-interactions/Horizontal-Scrolling.html
Downloaded and opened the project starter file. But I don't see the layer info or the assets in the project. Below is a screenshot of what I see
According to the tutorial, I should see a screen like below:
Not sure how to proceed, this is my first Origami studio project.
The issue was a bug introduced in the most recent version of Origami. Workaround is to use an older version.

Managing Demo / Full version of my app in Codename One

I was ordered to deliver an app in 2 versions : one demo/light (limitted features) the other full (all features). I have a boolean in code which tells which one is running. They both run as expected in the simulator or on a test device (iOS and Android).
Now I want to distribute them. So I read that it was possible with XCode to define different targets corresponding to the light / full versions and with Eclipse it was possible to define the base project as a library and then create 2 projects also corresponding to the light / full versions.
Before I start messing around with my app project, is there a recommended way to achieve my goal with CodenameOne maybe via build hints that would change the app name and the boolean inside the code depending on a build hint value ?
EDIT 19/09/2016 (working methodology)
Following Shai's advices here are the steps I followed to generate a light version based on the full one (in case someone encounters the same case) :
Under your IDE (Eclipse or whathever) copy and paste the base package in the src folder and rename it com.packageLIGHT.appName (simply append LIGHT to the package name, don't use underscore or space since it will be considered as an illegal character later by Apple)
=> So now in src folder you should have
src
|- com.packageLIGHT.appName
|- com.package.appName
Then in com.packageLIGHT.appName remove all files except MyApp.java (aka the main file). In this file add import com.package.myApp.*;
3.1. (ECLIPSE) In "Run/Run Configurations" menu copy the existing config and paste it as Simulator_MyAppLIGHT and in arguments change it to "com.packageLIGHT.myApp.MyApp".
3.2. (NETBEANS) The "Run/Set Project Configuration" does not seem to work as expected since any configuration that might be selected leads to the same default behaviour. However applying step 6. and running the project in the simulator afterward has the expected result.
Now you should be able to run both versions by running the different configurations.
For iOS (not sure if it is also needed for Android) you have to generate another pair of provisioning files. So move the existing ones in iosCerts/FULL and use CN1 wizard to generate the "light" version provisioning files where you'll adapt the package name to match "com.packageLIGHT.myApp". Store the generated files in iosCerts/LIGHT. There is no need to overwrite the existing certificates (more on certificate here).
Finally replace in "codenameone_settings.properties" the original package name with the "light" one for the lines codename1.ios.appid and codename1.packageName. Also change the iOS provisioning files to iosCerts/LIGHT or FULL depending of what you want to build.
Now when you send the Android / iOS build to CN1 server it will build either the "light" version or the full one depending on what package is written in "codenameone_settings.properties".
Please note : if at step 6. you get NullPointerException on build.xml on line 469 (android build) or 344 (iOS build) which deals with certPassword="${codename1.android.keystorePassword} (android build) or appid="${codename1.ios.appid}" (iOS build) and you're using CN1 plugin version 1.0.0 20160812 under Eclipse then Shai's comment below may be worth it
If you want 2 distinct versions of the same app then you need 2 distinct packages since the thing that defines the app uniquely in the store is the app package. There are two common ways to do it:
Place functionality in cn1lib and build two apps
Build one app and just swap the codenameone_settings.properties file
The first one should be pretty clear but might be a bit painful to work with as you can't run the cn1lib and might run into issues debugging it.
The second one is actually rather simple. Create the main version of the app then add the package to the demo version and copy the main file there.
To run the demo version just change the package in the IDE "run settings".
Copy your codenameone_settings.properties to a separate file and just replace all the regular package names to the demo package names. When you want to build the "demo" version replace the codenameone_settings.propeties files with one another, you can automate that with a script obviously.

Enable Sencha Touch 2.2.1 Offline

I'm currently toying around with Sencha Touch 2.2.1 and am trying to get it to run offline using an HTML5 cache.manifest. Anyone know how to get this to work? I can only find old guides from the last version which no longer seem to work. After some fiddling I have my manifest as follows:
CACHE MANIFEST
index.html
app.js
touch/microloader/development.js
But this seems to throw errors in the development.js script when it attempts to send fetch the app.json file. Are there some Sencha settings I have to adjust for offline mode? Thank you for your help.
After some hunting around it seems this feature is present in Sencha Touch 2.0 but still a bit incomplete. To get it to work, do as follows:
You must have the Sencha command line installed (which you probably
already have since it's required to make a Sencha project in the
first place).
Navigate to your project's parent directory in command line
Use the sencha app build production command to "compile" your project into a single file
Navigate to your production directory in YourApp/build/YourApp/production
Chane the extension of cache.appcache to cache.manifest
Edit the index.html file's html tag so that manifest="cache.manifest"
Ensure your server is configured to serve .manifest files correctly
Now your production code should have a working cache manifest. Note you only need to change the extension so that the app works on iOS, it seems to work in browser (or at least Chrome where I tested this) with the .appcache extension.
Compiling to production appears to be the only way to generate a cache manifest file but you can use this same file in a testing build if you don't want all the code minified for debugging. Of course you'll have to copy your manifest over and ensure it's referenced in your testing build's html tag.
All in all Sencha clearly needs to update their documentation here but I'm glad I found this out. I only tested this with a super basic, static, two page application. Hoping it scales decently.
Instead of changing manually your production package, you should change in app.json lines after 'appCache'. Here is what will be generated by Sencha CMD and will work just fine after running sencha app build production.
You can see a live example here https://github.com/flrent/ConfMate/blob/master/app.json#L79

Installing Sencha Touch 2 framework

I've a problem with getting Sencha Touch to work. I'm using a MacBook Pro and it's really been a hell installing this framework. Sencha don't seem to have any documentation that fits the latest version of their product and there is no way for me to download an older version from their website. Therefore I need your help!
I've downloaded Sencha SDK, SDKTools and their Cmd-software. The version of the SDK is 2.1.1, the SDKTools is 2.0.0 and I dont know the version of the cmd-software. All three softwares is however the latest from Senchas webpage.
I've placed the SDK under the root of the web server, and I've also installed the SDKTools in the root.
This is the structure I'm currently using:
Root of webbserver:
- SDK
- SDKTools
The SDK works in the way that I can surf into it, by using my browser into the "SDK"-folder. On that page I can view examples of Sencha applications.
When I go the SDK folder via the Terminal, and type "Sencha" - I get the error:
[WARN] The current working directory (/Applications/MAMP/htdocs/SDK) is not a recognized Sencha SDK or application folder. Running in backwards compatible mode.
I've googled this and tried the following actions:
1. Placed the SDKTools in the same folder as the SDK.
2. Created a systemfile named .senchasdk with the content "sdk".
3. Created a systemfile named .senchasdk with the content ".".
The first option, naturally doesn't work (didn't differ anything from the previous setup). The 2nd and 3rd action resulted in compilationerrors when typing Sencha in the SDK-folder. Example down below:
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module '/Applications/MAMP/htdocs/SDK/command/sencha.js'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:40)
I've also tried typing "Sencha" from the SDKTools folder, but that doesn't work either. I don't know what this problem comes from and can't find any other solutions to solve this. Does anyone know? Or have any suggestions on solution or part of solution?
Sencha Touch 2.1 doesn't work with SDK Tools anymore. The documentation bundled with Sencha Touch 2.1 is not up-to-date. Here is the good documentation :
http://docs.sencha.com/touch/2-1/#!/guide/command
On their website, you can download the 2.0 version of the Sencha CMD tool which is used instead of SDKTools nowadays. However, if you use the 2.0 version you will meet nothing but trouble since that is outdated. The latest version as of right now is 3.1 and can only be downloadable from your account at support.sencha.com, and not from the download page when not logged in.

Eclipse Juno 4.2 Google Plugin not installing: Cannot complete install because one or more required items could not be found

This is the error message I get:
Cannot complete the install because one or more required items could not be found.
Software being installed: Google App Engine Tools for Android 3.1.0.v201208080121-rel-r42 (com.google.gdt.eclipse.mobile.android.feature.feature.group 3.1.0.v201208080121-rel-r42)
I've tried numerous things including manually downloading the file from here and also I snooped around StackOverflow and I tried just moving all the plugins from the manual download into the plugins folder of my Eclipse. That didn't help me though because my perspective did not update with the plugins and I couldn't find the "Create New Web Application" option. I've also read some things about the XML file being wrong but I can't find it and those were for other Eclipse versions so I don't know if it applies to me.
I also tried excluding Google App Engine Tools for Android 3.1.0 but then it just says the next one in the list can't be found.
I'll be more than happy to provide anymore information. I am running Eclipse Juno 4.2 and Java 1.7 (I also have 1.6 installed though). I am using a Windows 7 PC. Thank you guys so much! I just want to code :[
I did not work for me with this URL: http://dl.google.com/eclipse/plugin/4.2
It worked with this one: http://dl.google.com/eclipse/plugin/3.8
I just changed 4.2 to 3.8.
I faced a similar problem I was downloading with 120 kb/s every time the download breaks down
when I moved to another place and downloaded the plugin with highest speed 400 kb/s It successfully downloaded and no problems found
You might think that issue is out of logic but that what I reached so far
Hope that Helps
I know this is a very old question but recently I found a solution to my problem so I am going to personally update the answer. For some reason, Eclipse Classic 4.2.2 Juno does not come with some of the required packages. After talking to some people, they recommended simply downloading Eclipse IDE for Java EE Developers which simply comes with most of the packages necessary. From there, it just worked!
My friend also mentioned you could try to manually download the packages on Eclipse Classic but that is far more of a hassle.
Hope this helps!

Resources