Hai capito bene e la classe si occupa già di rilevare la lingua del dispositivo e quindi mostrare i testi giusti.Il sistema di @Filippo non mi è molto chiaro.
Il localizator di Erel, se non ho capito male, mi permette di impostare tutto secondo la lingua che mi pare (fosse anche l'ostrogoto) e a fine progetto, inserire file xlsx con le traduzioni e la classe localizator (immagino che da qualche parte dovrò creare qualcosa in merito alle preferenze).
Forse per te non è chiaro, però secondo me è molto più semplice.Il sistema di @Filippo non mi è molto chiaro.
Nell'esempio c'è tutto quello che ti serve, non è difficile, prova a studiarlo.Se è più semplice perché no? Mi piacerebbe provarlo.
Come faccio a farlo funzionare? Mi sembra di aver capito che è un'app a sé stante per salvare in un database le varie traduzioni, ma poi cosa dovrei fare?
#If B4J
Private Cur As ResultSet
Private RowCount As Int
Cur = SQL1.ExecQuery("PRAGMA table_info(language)")
Do While Cur.NextRow
RowCount = RowCount + 1
lst.Add(Cur.GetString("name"))
' Log(Cur.GetString("name"))
Loop
Cur.Close
#Else if B4A
Dim Cur As Cursor
Cur = SQL1.ExecQuery("PRAGMA table_info(language)")
For i = 2 To Cur.RowCount - 1
Cur.Position = i
lst.Add(Cur.GetString("name"))
' Log(Cur.GetString("name"))
Next
Cur.Close
#End if
Se leggi bene it post, ho scritto che la funzione "Translate" è stata disattivata.Grazie!
Il codice dovrebbe, quindi, essere qualcosa del genere:
B4X:#If B4J Private Cur As ResultSet Private RowCount As Int Cur = SQL1.ExecQuery("PRAGMA table_info(language)") Do While Cur.NextRow RowCount = RowCount + 1 lst.Add(Cur.GetString("name")) ' Log(Cur.GetString("name")) Loop Cur.Close #Else if B4A Dim Cur As Cursor Cur = SQL1.ExecQuery("PRAGMA table_info(language)") For i = 2 To Cur.RowCount - 1 Cur.Position = i lst.Add(Cur.GetString("name")) ' Log(Cur.GetString("name")) Next Cur.Close #End if
Altro intoppo, se clicco su "Translate" e textbox <> "" ottengo questo risultato:
View attachment 113663
For Each objFTF As B4XFloatTextField In Root.GetAllViewsRecursive
Log(objFTF.HintText)
objFTF.HintText = language.Value(objFTF.HintText)
Next
Error occurred on line: 49 (B4XMainPage)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:460)
at b4j.B4XPageLanguageFil.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:867)
at b4j.B4XPageLanguageFil.b4xpagesmanager._showpage(b4xpagesmanager.java:346)
at b4j.B4XPageLanguageFil.b4xpagesmanager._addpage(b4xpagesmanager.java:175)
at b4j.B4XPageLanguageFil.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:189)
at b4j.B4XPageLanguageFil.b4xpagesmanager._initialize(b4xpagesmanager.java:125)
at b4j.B4XPageLanguageFil.main._appstart(main.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
at b4j.B4XPageLanguageFil.main.start(main.java:38)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:134)
at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:81)
... 35 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:115)
... 36 more
Caused by: java.lang.ClassCastException: javafx.scene.control.Button cannot be cast to b4j.B4XPageLanguageFil.b4xfloattextfield
at b4j.B4XPageLanguageFil.b4xmainpage._b4xpage_created(b4xmainpage.java:99)
... 41 more
For Each obj As B4XView In Root.GetAllViewsRecursive
If obj Is Button Or obj Is Label Then
Log(obj.Text)
obj.Text = language.Value(obj.Text)
End If
Next
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:460)
at b4j.B4XPageLanguageFil.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:867)
at b4j.B4XPageLanguageFil.b4xpagesmanager._showpage(b4xpagesmanager.java:346)
at b4j.B4XPageLanguageFil.b4xpagesmanager._addpage(b4xpagesmanager.java:175)
at b4j.B4XPageLanguageFil.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:189)
at b4j.B4XPageLanguageFil.b4xpagesmanager._initialize(b4xpagesmanager.java:125)
at b4j.B4XPageLanguageFil.main._appstart(main.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
at b4j.B4XPageLanguageFil.main.start(main.java:38)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:134)
at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:81)
... 35 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:115)
... 36 more
Caused by: java.lang.RuntimeException: Type does not match (class anywheresoftware.b4j.objects.PaneWrapper$ConcretePaneWrapper$NonResizePane)
at anywheresoftware.b4a.objects.B4XViewWrapper.typeDoesNotMatch(B4XViewWrapper.java:573)
at anywheresoftware.b4a.objects.B4XViewWrapper.getText(B4XViewWrapper.java:324)
at b4j.B4XPageLanguageFil.b4xmainpage._b4xpage_created(b4xmainpage.java:80)
... 41 more
Ne hai uno solo: quello di non aver scelto la soluzione di Erel che ti ho suggerito fin dall'iniziodue problemi.
Non sò perchè la fai così complicata.., prova in questo modo:Ciao,
due problemi.
1°
Queste righe di codice:
B4X:For Each objFTF As B4XFloatTextField In Root.GetAllViewsRecursive Log(objFTF.HintText) objFTF.HintText = language.Value(objFTF.HintText) Next
mi restituiscono il seguente errore:
B4X:Error occurred on line: 49 (B4XMainPage) java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:460) at b4j.B4XPageLanguageFil.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:867) at b4j.B4XPageLanguageFil.b4xpagesmanager._showpage(b4xpagesmanager.java:346) at b4j.B4XPageLanguageFil.b4xpagesmanager._addpage(b4xpagesmanager.java:175) at b4j.B4XPageLanguageFil.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:189) at b4j.B4XPageLanguageFil.b4xpagesmanager._initialize(b4xpagesmanager.java:125) at b4j.B4XPageLanguageFil.main._appstart(main.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91) at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98) at anywheresoftware.b4a.BA.raiseEvent(BA.java:78) at b4j.B4XPageLanguageFil.main.start(main.java:38) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:134) at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:81) ... 35 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:115) ... 36 more Caused by: java.lang.ClassCastException: javafx.scene.control.Button cannot be cast to b4j.B4XPageLanguageFil.b4xfloattextfield at b4j.B4XPageLanguageFil.b4xmainpage._b4xpage_created(b4xmainpage.java:99) ... 41 more
Come mai?
Visto che se li modifico ad uno ad uno ("B4XFloatTextField1.HintText = language.Value(B4XFloatTextField1.HintText)" e "B4XFloatTextField2.HintText = language.Value(B4XFloatTextField2.HintText)") non mi da problemi?
2°
Queste non sono un problema se lo limito a "Button" o "Label":
B4X:For Each obj As B4XView In Root.GetAllViewsRecursive If obj Is Button Or obj Is Label Then Log(obj.Text) obj.Text = language.Value(obj.Text) End If Next
ma se tolgo la condizione "If obj Is Button Or obj Is Label", invece, è restituito il seguente errore:
B4X:java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:460) at b4j.B4XPageLanguageFil.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:867) at b4j.B4XPageLanguageFil.b4xpagesmanager._showpage(b4xpagesmanager.java:346) at b4j.B4XPageLanguageFil.b4xpagesmanager._addpage(b4xpagesmanager.java:175) at b4j.B4XPageLanguageFil.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:189) at b4j.B4XPageLanguageFil.b4xpagesmanager._initialize(b4xpagesmanager.java:125) at b4j.B4XPageLanguageFil.main._appstart(main.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91) at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98) at anywheresoftware.b4a.BA.raiseEvent(BA.java:78) at b4j.B4XPageLanguageFil.main.start(main.java:38) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:134) at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:81) ... 35 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:115) ... 36 more Caused by: java.lang.RuntimeException: Type does not match (class anywheresoftware.b4j.objects.PaneWrapper$ConcretePaneWrapper$NonResizePane) at anywheresoftware.b4a.objects.B4XViewWrapper.typeDoesNotMatch(B4XViewWrapper.java:573) at anywheresoftware.b4a.objects.B4XViewWrapper.getText(B4XViewWrapper.java:324) at b4j.B4XPageLanguageFil.b4xmainpage._b4xpage_created(b4xmainpage.java:80) ... 41 more
Come mai?
Grazie in anticipo!
Button1.Text = language.Value("Click")
Button2.Text = language.Value("Ok")
Button3.Text = language.Value("Cancel")
Button4.Text = language.Value("Yes")
Button4.Text = language.Value("No")
Label1.Text = language.Value("This is a label")
' For Each obj As B4XView In Root.GetAllViewsRecursive
' If obj Is Button Or obj Is Label Then
' Log(obj.Text)
' obj.Text = language.Value(obj.Text)
' End If
' Next
B4XFloatTextField1.HintText = language.Value("Username")
B4XFloatTextField2.HintText = language.Value("Password")
' For Each objFTF As B4XFloatTextField In Root.GetAllViewsRecursive
' Log(objFTF.HintText)
' objFTF.HintText = language.Value(objFTF.HintText)
' Next
Proverò sicuramente anche quello (e starò qui a fare domande)!Ne hai uno solo: quello di non aver scelto la soluzione di Erel che ti ho suggerito fin dall'inizio
Più che complicarla, vorrei semplificarla. Non solo seguendo il n. 8 di questi suggerimenti ma il tuo suggerimento mi va bene se ho qualcosa di "piccolo" ma se ho 8 pagine con 10 o più controlli ciascuna, devo scrivere righe e righe di codice. Così, invece, ho uno snippet che ripeto in ciascuna pagina (oppure creo una sub nella clsLanguage2 che richiamo in ciascuna pagina) e fa da solo pescando dal file creato conla tua ottima app.Non sò perchè la fai così complicata.., prova in questo modo:
B4X:Button1.Text = language.Value("Click") Button2.Text = language.Value("Ok") Button3.Text = language.Value("Cancel") Button4.Text = language.Value("Yes") Button4.Text = language.Value("No") Label1.Text = language.Value("This is a label") ' For Each obj As B4XView In Root.GetAllViewsRecursive ' If obj Is Button Or obj Is Label Then ' Log(obj.Text) ' obj.Text = language.Value(obj.Text) ' End If ' Next B4XFloatTextField1.HintText = language.Value("Username") B4XFloatTextField2.HintText = language.Value("Password") ' For Each objFTF As B4XFloatTextField In Root.GetAllViewsRecursive ' Log(objFTF.HintText) ' objFTF.HintText = language.Value(objFTF.HintText) ' Next
Chiaro, grazie!Caso 2
Caused by: java.lang.RuntimeException: Type does not match (class anywheresoftware.b4j.objects.PaneWrapper$ConcretePaneWrapper$NonResizePane)
Riceve un panel o un qualche container e, senza la condizione, "pretende" di accedere alla proprietà Text che l'oggetto in questione evidentemente non ha.
Ok, ma anche scrivendolo:Il problema è comune ai due casi. Con GetAllViewsrecursive ricevi ogni genere di view, non solo quelle che ti aspetti.
Caso1
Caused by: java.lang.ClassCastException: javafx.scene.control.Button cannot be cast to b4j.B4XPageLanguageFil.b4xfloattextfield
Riceve un Button e il tuo codice lo tratta come fosse un B4xFloatText
For Each objFTF As B4XFloatTextField In Root.GetAllViewsRecursive
If objFTF Is B4XFloatTextField Then
Log(objFTF.HintText)
objFTF.HintText = language.Value(objFTF.HintText)
End If
Next
Error occurred on line: 49 (B4XMainPage)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:460)
at b4j.B4XPageLanguageFil.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:867)
at b4j.B4XPageLanguageFil.b4xpagesmanager._showpage(b4xpagesmanager.java:346)
at b4j.B4XPageLanguageFil.b4xpagesmanager._addpage(b4xpagesmanager.java:175)
at b4j.B4XPageLanguageFil.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:189)
at b4j.B4XPageLanguageFil.b4xpagesmanager._initialize(b4xpagesmanager.java:125)
at b4j.B4XPageLanguageFil.main._appstart(main.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
at b4j.B4XPageLanguageFil.main.start(main.java:38)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:134)
at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:81)
... 35 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:115)
... 36 more
Caused by: java.lang.ClassCastException: javafx.scene.control.Button cannot be cast to b4j.B4XPageLanguageFil.b4xfloattextfield
at b4j.B4XPageLanguageFil.b4xmainpage._b4xpage_created(b4xmainpage.java:99)
... 41 more