Android Question Custom type

Massimo66

Member
Hi,
I have this problem: if I declare this type:
Type tBar( Supplier As String, _
Art As String, _
ArtFatt As String, _
DataLot As String, _
Weight As String, _
Lot As String _
)


both in the Main module and in Global,

when for example i declare dim myRec as tBar debugging crashes:
Error occurred on line: 143 (carico)
java.lang.ClassNotFoundException: b4a$example$main$_tbar
at anywheresoftware.b4a.shell.Shell.getCorrectClassName(Shell.java:639)
at anywheresoftware.b4a.shell.Shell.createObject(Shell.java:611)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:366)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:205)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:7455)
at android.view.View.performClickInternal(View.java:7428)
at android.view.View.access$3600(View.java:813)
at android.view.View$PerformClick.run(View.java:28495)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7723)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)


the error also occurs when declaring the variable in another sub.
In the same Main->Process_Globals I have 2 other types and they don't cause any errors.



Sub Process_Globals
Type tBar( Fornitore As String, _
Art As String, _
ArtFatt As String, _
DataLotto As String, _
Peso As String, _
Lotto As String _
)

Type tApp ( PathIni As String, _
AppName As String, _
FTPServerName As String, _
FTPUserName As String, _
FTPPassword As String, _
FTPExtension As String, _
FTPPort As String, _
FTPPassiveMode As String, _
FTPDestPath As String, _
IDPalmare As String, _
PesoMax As String _
)



Type aRet( bOk As Boolean, _
sVar As String _
)
 

GMan

Well-Known Member
Licensed User
Longtime User
Type mismatch ?

Did you try this:

B4X:
Type tBar(Supplier As String, Art As String, ArtFatt As String, DataLot As String, Weight As String, Lot As String) ?

i had those similar some time ago, too - issues was an extra space char behind the ,_
 
Upvote 0

Massimo66

Member
I also added a new type with different sub-field name and the error is the same !!!
I tryed with your version without at the end _
Type tBar ( Fornitore As String, _
Art As String, _
ArtFatt As String, _
DataLotto As String, _
Peso As String, _
Lotto As String)
The error remain !!!
There is a limit of number of type ?
why it recognize the type as class ? (java.lang.ClassNotFoundException: b4a$example$main$_tbar)
 
Upvote 0
Top