Product Version: Apache NetBeans IDE 12.2
Updates: NetBeans IDE is updated to version NetBeans 8.2 Patch 2
Java: 1.8.0_281; Java HotSpot(TM) 64-Bit Server VM 25.281-b09
Runtime: Java(TM) SE Runtime Environment 1.8.0_281-b09
System: Mac OS X version 10.14.6 running on x86_64; UTF-8; da_DK (nb)
User directory: /Users/xxxxx/Library/Application Support/NetBeans/12.2
Cache directory:
/Users/xxxxx/Library/Caches/NetBeans/12.2
I am experimenting with the toDoApp
I have tried to apply the code from the video: https://codenameone.teachable.com/courses/115309/lectures/3014342.
The simulator crashes and highlights the line: UIManager.getInstance().setBundle(theme.getL10N("I","dk")); I have tried to place the script several places but it has not helped.
I have made the following change to Properties: -Duser.language=dk, and made a list dk which looks like this csv: Key,dk,en,iw,
"1. {Line2=more..., Line1=Entry 1}","1. {Line2=more..., Line1=Entry 1} 1. {Line2=more..., Line1=Entry 1} ","1. {Line2=more..., Line1=Entry 1}","",
"2. {Line2=more..., Line1=Entry 2}","2. {Line2=more..., Line1=Entry 2}","2. {Line2=more..., Line1=Entry 2}","2. {Line2=more..., Line1=Entry 2}",
"3. {Line2=more..., Line1=Entry 3}","3. {Line2=more..., Line1=Entry 3}","3. {Line2=more..., Line1=Entry 3}","3. {Line2=more..., Line1=Entry 3}",
"@rtl","","","true",
"Add Task","Ny opgave","Add Task","הוסף משימה",
"Button","Button","Button","Button",
"Capture Photo","Vælg foto","Capture Photo","צל×� ×ª×ž×•× ×”",
"Description","Beskrivelse","Description","תי�ור",
"Entry 1","Nr. 1","Entry 1","",
"Entry 2","Nr. 2","Entry 2","",
"Entry 3","Nr. 3","Entry 3","",
"Import JSON","Hent JSON","Import JSON","יב� JSON",
"Import XML","Hent XML","Import XML","יב� XML",
"MultiButton","Flerfunktions knap","MultiButton","",
"My task","Min opgave","My task","משימות שלי",
"New Task","Ny opgave","New Task","משימה חדשה",
"Settings","Indstillinger","Settings","הגדרות",
"Tasks","Opgaver","Tasks","משימות",
"Title","Titel","Title","כותרת",
"Todo","Opgave","Todo","משימות",
"Toggle Theme","Skift tema","Toggle Theme","החלף מר�ה",
"cancel","slut","Cancel","בטל",
"details regarding my task","detaljer om min opgave","details regarding my task","פרטי� לגבי המשימה",
"edit","rediger","Edit","ערוך",
"menu","menu","Menu","תפריט",
"more...","mere....","more...","עוד...",
"ok","ok","OK","�שר",
"select","vælg","Select","בחר",
What am I doing wrong - thanks in advance
At Shai Almog
Sorry for sending to the wrong mail - and thanks for your quick reply. I will change accordingly and revert if there is still a problem.
Regards Henrik
--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/189ab186-58c8-4e98-a784-ac4ce0f5b0a6n%40googlegroups.com.
Henrik Glensbo
Lodkrog 10
4684 Holmegaard
allergiskhverdag.dk
stofskiftesygdom.dk
dengodeklassekammerat.dk
At Shai Almog
Thanks for your reply and your helpI will continue to look for possibilities, but for now, I think you have done enough as my skills in Java are close to non-exsitent.
I will revert
Regards Henrik
--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/24bca3a2-491a-4bcc-8f16-00b6b80bc6d3n%40googlegroups.com.
At Shai Almog
Tried the following:
You need to fix the classpath problem in
Netbeans:
https://stackoverflow.com/questions/23532966/the-libs-copylibs-classpath-property-is-not-set-up/66079126#66079126
Fresh import of the original ToDoApp
Change of build.xml - 1.5 to 1.8
Changed name of Localization
(L10N) 1 to Localization (L10N) and synced with UI (you can now
see the Danish text in the Designer.)
Will not run in the simulator from the script
Project properties changed to 1.8 from 1.6
Run -> wm options set -Duser.language=dk
Still not able to run because of several deprecated services
Changed Vector to ArrayList
Changed Hashtable to HashMap except from this line:
Hashtable<String, Object> h = p.parse(new InputStreamReader(is));//change to Hashtable?? solves error
//entries.addElement(value); entries commented out but are there an alternative??
Now the simulator runs in English. So I am back to where I was before.
Entering this code in toDoApp.java:
public void start(Resources theme){
theme = UIManager.initFirstTheme("/theme");
String lang = L10NManager.getInstance().getLanguage();
if(lang != null){
lang = lang.toLowerCase();
switch(lang){
case "da":
case "dk":
UIManager.getInstance().setBundle(theme.getL10N("I","dk"));
break;
}
}
Toolbar.setGlobalToolbar(true);
Not totally as when I run the Simulator after that it enters a
black screen on the Simulator and then this error message:
Couldn't find a main or a startup in
com.codename1.demos.todo.TodoApp
So stuck again -
But I will search on for a solution
Thanks for any input
Henrik
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/6e18f992-c7b8-41a6-adf7-e7f12d34bf97n%40googlegroups.com.
At Shai Almog
What ever I do the error is still:
error: cannot find symbol
UIManager.getInstance().setBundle(theme.getL10N("Localization
(L10N)","dk"));
symbol: method getL10N(String,String)
location: variable theme of type Object
This may be due to changing Vector to
ArrayList and Hashtable to HashMap - but I'm not sure. I will
search on to see if I can find a solution. But I feel I circle
round and end up the same place as I started, but til missing
the solution.
((I also tried this solution:
(https://stackoverflow.com/questions/62182526/codename-one-accessing-localized-string-resources)
theme = UIManager.initFirstTheme("/theme");
String lang= L10NManager.getInstance().getLanguage();
UIManager.getInstance().setBundle(theme.getL10N("Localization (L10N)",lang));))
Thanks for your help
Regards
Henrik
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/caf2d6a6-b0d3-42c7-85f4-684ad8da9ec1n%40googlegroups.com.