Dear All.
This is my first ever question on this forum as I have always managed to find the answer using the wealth of knowledge from previous questions so please be gentle with me!
From this thread: https://www.b4x.com/android/forum/threads/b4xobject-b4a-b4j-b4i-objects-serialization.48272/#content
Erel Says:
I have created a Custom Type, however I get the following error when I call raf.WriteB4XObject
If I use WriteObject or WriteEncryptedObject it works fine.
I believe this issue is related to my Custom Type containing a List.
Is this behaviour normal?
Attached is a very simple Sample Project which shows the problem.
Many Thanks.
Alan.
Edit: Also, in case it matters.
B4A Version: 4.30
RandomAccessFile Version: 2.00
This is my first ever question on this forum as I have always managed to find the answer using the wealth of knowledge from previous questions so please be gentle with me!
From this thread: https://www.b4x.com/android/forum/threads/b4xobject-b4a-b4j-b4i-objects-serialization.48272/#content
Erel Says:
The following types are supported by WriteB4XObject:
Lists, Maps, String, primitives, user defined types and arrays. Only arrays of bytes and arrays of objects are supported (in B4A and B4J).
Including combinations of these types (a list that holds maps for example).
Note that if you plan to read user defined types that were written by B4i from B4A or B4J then the types must be declared in the main module.
I have created a Custom Type, however I get the following error when I call raf.WriteB4XObject
B4X:
java.lang.RuntimeException: java.lang.RuntimeException: Cannot serialize object: (ArrayList) [1, 2, 3]
If I use WriteObject or WriteEncryptedObject it works fine.
I believe this issue is related to my Custom Type containing a List.
Is this behaviour normal?
Attached is a very simple Sample Project which shows the problem.
Many Thanks.
Alan.
Edit: Also, in case it matters.
B4A Version: 4.30
RandomAccessFile Version: 2.00
Attachments
Last edited: