Where do I find googlemaps.MapContainer to import for the Ratatouilles Restaurant demo? - codenameone

I am trying to run the Ratatouilles Restaurant demo. Where do I find the googlemaps.MapContainer to import.

This demo uses the GoogleMaps.cn1lib that is in the lib directory, to use this right click on your project and select "CodenameOne->Refresh cn1lib files" then rebuild the project

Related

Make WebStorm see the paths

I do have an Electron + React project which I inherited from another developer.
in the index.js there are a couple of imports that WebStorm is saying it cannot find, however, the application compiles and works as needed.
and here is the structure of the folders relative to index.js
How do I make WebStorm happy and make it see the imports and navigate properly to them?
I tried to use exports section in the package.json like this
"exports": {
"./": "./src/"
}
but it didn't help.
Any other options?
Right-click on src directory and select Mark Directory as | Resource Root.

Delete dialog box not showing delete and cancel

In react admin code delete dialog box is not showing delete / cancel after clicking delete. Its showing
Ra.action.cancel ra.action.delete
In the code I have imported ra-custom-confirm
React admin ver is 3.8.1 in package.json.
What you see are translation identifiers, which are normally converted to text by the internationalization (i18n) system of React-admin.
If you havent't tweaked the i18nProvider in your Admin, you may have imported two conflicting versions of the same react-admin package (probably ra-core). Check your yarn.lock or packages-lock.json for duplicate versions of ra-* packages.

how to add time picker using react materialize?

I am using react materialize time picker
and I am getting this error:
TypeError: $(...).pickatime is not a function
According to this github comment
pickatime doesn't work with certain version of materialize-css
Update materialize-css version accordingly
Visit this link https://react-materialize.github.io/#/forms.
Goto View page source from that page.Copy the materialize.js and main.css link and replace it in index.html from public folder from your react project.
Open main.css link and copy entire code and make new file(main.css) in your public folder and paste the code there. It worked for me hope it works for you.

React with JetBrains WebStorm auto import with absolute path instead of relative

I'm doing various projects in React.js with using awesome WebStorm by JetBrains.
Every time I type an existing component name WebStorm imports it automatically for me, which is awesome, but it is doing so by its relative path based on the file I'm doing the importation on.
Looks like so:
import vintageAxios from "../../../../services/api/index";
But I'm expecting it to be like:
import vintageAxios from "services/api/index";
I already setup my .env.local file with the NODE_PATH=src/ variable, I've used create-react-app to setup the project.
EDIT: I'm not having problems with the importations. What I want to know is if there is a way to configure WebStorm so it automatically does the importations with absolute instead of relative paths.
Found it (WebStorm 2017.2), after marking your source directory (ex. /src) as the source root (right click it to find that), you can then check this box:
For anyone using Typescript. Check the option Use paths relative to tsconfig.json in Editor > Code Style > Typescript

butterknife zelezny can't show in generate menu for AndroidStudio1.3.1

My Android studio version is 1.3.1,
When I add the plugin of butterknife zelezny 1.3.2 by the step:
download it and install via Preferences → Plugins → Install plugin from disk.
but, failed to show the button of "Generate ButterKnife Injections" in the menu of generate.
what's reason of this issue? How can resolve it?
Thanks.
restart your AS
right click on R.layout.my_layout
choose generate(or click Alt+Insert)
you may see "generate Butterknife injections" item in the menu
I also faced the same .So if am correct you have not added butter knife dependencies in your gradle file.
dependencies {
compile 'com.jakewharton:butterknife:7.0.1'
}
Add this in your projecct build.gradle(Module:app)
Once you are done with you will get Generate ButterKnife Injections option on right click of layout.
as #Woi mentioned from above you can do this way.
For Windows you can do the same by following below steps.
1.right click on R.layout.my_layout in activity or fragment
2.Click generate(Alt+Inser)
3.Generate butterknife injection(Ctrl+Shift+B)
It works on 7.0.1. Not works on 8.0.1
1.works:
compile 'com.jakewharton:butterknife:7.0.1'
2.not works:
compile 'com.jakewharton:butterknife:8.0.1'
I had this same issue but restarting didn't fix it. I resolved it by adding classpath 'com.jakewharton:butterknife-gradle-plugin:8.7.0' to my gradle build file at project level so that it's buildscript section looks like
buildscript {
repositories {
google()
jcenter()
}
dependencies {
...
classpath 'com.jakewharton:butterknife-gradle-plugin:8.7.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
Secondly, to see the "Generate ButterKnife Injections" in the menu, you'll need to focus the mouse cursor on the layout file and right-click on it then select "Generate".
e.g. in Fragment, View v = inflater.inflate(R.layout.fragment_create_new_order, container, false); right click on "fragment_create_new_order" and select "Generate"
My Android studio version is 3.1.2, When I add the plugin of butterknife zelezny 1.6.0 by the step: download it and install via Preferences → Plugins → Browse repositories and search for ButterKnife Zelezny.
I had this same issue.
I resolved it by adding classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1' to my gradle build file at project level so that it's buildscript section looks like:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
}
}
https://github.com/JakeWharton/butterknife README.md is uesful.

Resources