Upgrading ExtjJS6 project to ExtJS7 - How can I make the new "Open Tooling" work with multi-app workspaces? - extjs

I have ExtJS 6.2 project with multi application workspace.
Trying to figure it out how to upgrade it to ExtJS7.
According to documentation I should use ext-gen migrate, but when running it I'm getting the following error:
'Upgrade multi-application workspace is not yet supported'
How can I make the new "Open Tooling" work with multi-app workspaces?

Open tooling or not does not matter if you follow the following:
download ExtJS7 (here ExtJS 7.4)
create a new workspace
copy content of folder ext to ext-7.4.0 in your current project
workspace.json (add to frameworks)
"ext74": {
"path":"ext-7.4.0",
"version":"7.4.0.42"
}
app.json (inside your apps)
"framework": "ext74",
go over the release notes of each version between your current version and the version you want to upgrade to. Example:
https://docs.sencha.com/extjs/7.3.1/guides/whats_new/release_notes.html

Related

Sencha Architect "Unable to open your app.json file"

I've been trying to follow Sencha's basic tutorial on Sencha Architect with the Sencha Architect trial version, but I've been stuck on the step of the tutorial titled, "Save Your Project". I've been encountering this error in the Sencha Architect Logs every time I save my new projects:
As the error suggests, there was no "app.json" generated by Sencha Architect:
The "CMD Output Tab" also produces this output upon saving the Sencha Architect project:
[INF] Initializing empty workspace at C:\Users\marco\source\sencha-sandbox\Test2
[INF] Copying framework to C:\Users\marco\source\sencha-sandbox\Test2\ext
[INF] Added framework ext to workspace.json
[ERR] The specified string cannot be converted into a valid namespace identifier
Exception in thread "Thread-13"
com.sencha.exceptions.BasicException: com.sencha.exceptions.ExState: Invalid namespace : Test2
at com.sencha.tools.server.service.tasks.DispatchTask.execute(DispatchTask.java:55)
....
If it makes any difference, I am using the latest versions of Java JDK (17.0.1) and Ruby (3.0.2p107).
Here is a selection of some of the things I've tried to resolve the issue, none of which have worked:
Restart windows ❌
Recreate project ❌
Create new project with Ext JS 6.0.x, instead of the latest version ❌
Reinstall everything and try following the tutorial again on a
completely new instance of Windows 10 ❌
What I have been able to do successfully is create and run a project through the Sencha CMD following the Sencha CMD tutorial, so I find it interesting that the Sencha CMD-generated project works perfectly fine, yet my Sencha Architect Trial version cannot create a functioning project.
I got into contact with one of Sencha's engineers today, who helped me to resolve this:
When Sencha Architect (v4.2.9) installed with CMD, the CMD version (v7.3.0.19) that was automatically installed alongside Sencha Architect was causing this error.
To fix this version issue, within Sencha Architect, I had to go to menu at Edit > Preferences > Dependencies, and change the default "Custom Cmd Base Path" from
C:\Users\marco\bin\Sencha\Architect\Cmd
to the install location of the standalone Sencha CMD
C:\Users\marco\bin\Sencha\Cmd
After doing that, you re-launch Sencha Architect, and Sencha Architect will ask you to update Sencha CMD, which you proceed with. From there, it seems that all your future projects should be good to go without issue.

How to add Scandit barcode plugin to custom build of Phonegap developer ios app?

I use Phonegap Desktop and Phonegap Developer app for a while now. This is really interesting for quickly testing my development.
But I'm facing a limitation with the embedded barcode scanner which is displaying the camera display in full screen.
I need to embed the camera display into a container so I have space for displaying information in the same time.
After searching for a while, I've discovered the Scandit SDK for PhoneGap was the only plugin which allows cropping the camera display.
I spent a lot of time trying to implement Scandit, but no success. At least I can build the app, but when using it, scanner is not working...
Here are the steps I've followed:
clone the PhoneGap Developer project from Git
Install using npm
add ios platform
open the xcode project file
build the application and run it on device
=> At this time the PG Dev is running well and my application is working fine
Then, i continued:
remove all reference to the default barcode scanner plugin
build the application and run it on device
==> PG Dev still working fine and my application is working fine
Next steps:
clone the Scandit phonegap plugin from Git
download the Scandit SDK from my scandit account
put the SDK into the cloned scandit phonegap plugin
modify the plugin.xml to change the path to the bundle and framework (mismatch of version name in the path)
<resource-file src="src/ios/scanditsdk-community-ios_4.16.1/ScanditBarcodeScanner.bundle"/>
<framework src="src/ios/scanditsdk-community-ios_4.16.1/ScanditBarcodeScanner.framework" custom="true"/>
copy bundle and framework into the correct folder of scandit
modify the config.xml to include reference to Scandit and set the spec attribut to the version of the SDK
build the application and run it on device
==> PG Dev still working fine and my application is working fine (it doesn't use scandit for the moment)
Next steps:
Remove my project from PhoneGap desktop
add Scandit Sample project to PG Desktop
I used the "Continuous Scaled/Cropped" example from there: http://docs.scandit.com/4.12/phonegap/cordova-examples.html
add my App Key for the license
launch my PG Dev app on my device and download the project files
==> PG Dev is running fine and download the Scandit Sample App.
But the app doesn't work. When clicking on the scan button, nothing happends..
After some investigation, I found that I ran through an exception on Scandit class.
Adding a try on the command 'Scandit.License.setAppKey' allowed me to report in the PG Desktop log the following error:
ReferenceError: Can't find variable: Scandit
Adding this try/catch made the app raising an exception at the next line:
var settings = new Scandit.ScanSettings();
After searching the web about my error, and some posts were suggesting to manually add the framework and bundle into xcode.
So I did it by drag&droping the framework and bundle into the framework folder of the xcode project.
But when I try building my project, it is failing with many errors...
To solve it, I had to had manually all the scandit plugin files (*.h and *.m) into my xcode project.
All previous errors have been solved, but new ones appeared.
This was due to some other missing native ios frameworks...
Once these framework added, all errors were solved and I managed to successfully build the application.
But when running it, I'm still having the error: "ReferenceError: Can't find variable: Scandit"
I'm now running out of idea..
What did I do wrong?
Is there anyone having managed to build a PG Desktop with Scandit embedded?
Thanks.
Sorry for this long post, just tried to be the more precise I could be.
The issue here is two fold. First you need to be aware that the Scandit Barcode Scanner plugin makes use of native code and can therefore not be used in the Phonegap Developer app, as the only thing transmitted to it is your html/css/javascript and the javascript part of the plugin. To also include the native parts of the plugin you have to build and deploy the project yourself. As you are trying to build the XCode project it seems like you are now doing this.
The second part is that you are way overcomplicating the adding of the plugin. There is no need for you to manually clone the git repo, add our libraries, adjust paths in the plugin.xml etc. You can directly download the entire plugin as a zip from your account at scandit.com where the library is contained and the plugin.xml is correct. After that you can simply add the plugin to your project through the CLI (also see our documentation for this at http://docs.scandit.com/stable/phonegap/cordova-integrate.html) and there is no need to do anything manually unless you are using a very outdated Phonegap version that fails to properly handle the plugin.xml. Doing it the automated way with our properly prepared plugin zip will remove most error sources, please try it that way.
Thanks #moritzha. It helped me finding the solution.
I followed this doc at the beginning but it was not working.
After adding the plugin and building the application, I never managed to see it in my xcode project.
I took the opportunity of changing my mac to restart everything from scratch, and after many tries I found where I was wrong.
In fact, the documentation provided by scandit is missing one step.
The command ' phonegap plugin add < path to downloaded and unzipped plugin > ' is doing half of the job.
The command is correctly copying the plugin files to my project but it is not updating the config.xml.
So before building your application, you have to edit the config.xml located at the root of your project folder.
You need to manually reference the plugin with the following:
and replace the x by the version of the sdk you will use.
Once the config.xml updated, you will be able to build the app for your targeted platform.
I now have my own version of the Phonegap Developer App with the Scandit plugin in place of the default barcode scanner plugin. And it works perfectly.
This plugin is awesome!
PhoneGap Developer App version: 1.7.2 (taken on Github)

Ext JS - Creating a new application

I have installed SenchaCmd-6.0.2.14-windows-64bit.exe and it installed into the folder C:\users\myname\bin....
I am trying to create a new app. I have tried the cmd given in the sencha site. But it says "Not a framework directory".
Kindly help me to start it... I am new to Extjs
After downloading Sencha CMD you'll need to download the EXT JS SDK or you can download the GPL version. You can get them from official Sencha website (as you would have downloaded Sencha CMD).
Then you can generate the app by specifying the location where you have kept the EXT JS SDK or else, navigate to location where you have kept the EXT JS SDK using command prompt, then give the generate command. For example.
D:\ext-6.0.2-trial\ext-6.0.2>sencha generate app YouAppName <location>
Specify the location where you want to create the files of the application, usually the c:\inetpub\wwwroot directory if you are using IIS server on Windows.

ExtJS Sencha Build getting ext SDK from remote/CDN location

I use ExtJS 5 and build my application using Sencha Cmd.
I have Sencha app generated inside my maven based webapp.
I would like to host the SDK on some CDN and still be able to use Sencha Cmd "sencha app build" etc. Is this possible? I need to trip down the size of my webapp.
Please guide.
Do not upload this folder to source control at all.
Instead, put a readme file to tell fellow developers (who will want to build the dev version of the app) how to install Sencha ExtJS and re-generate this ext folder on their side using this command:
cd <path_to_your_app_root>
sencha app upgrade <path_to_extjs_root_folder>
Other project stackholders (Testers, management, ...) should use the production version of the app.

PHP Eclipse - importing existing CakePHP projects

I'm trying to import existing Cake 1.2 projects into PHP Eclipse (latest all-in-one download on Galileo build) - I don't think I understand Eclipse properly:
1) I have created Workspace on my web root C:\Program Files\xampp\htdocs
2) I have created new Project C:\Program Files\xampp\htdocs\EclipseCake
... how do I import my existing cake project into my new project (EclipseCake) ?
I tried Configure Include Path -> Project -> Add ... but no file browser appears. I'm obviously misunderstanding this.
There's an "Import" in the menu if you right click the new project's name.What you need to do is click it and choose "Filesystem" and click "next" button.You may read this tutorial about eclipse.

Resources