B4J Question Save form position exception

Acuario

Member
Licensed User
Longtime User
I just tried adding the save form position code to my B4J project and on running it crashed with an exception.

The sample code misses two lines of code:
In B4XPage_Created you need to add:
B4X:
    xui.SetDataFolder("XXXXXX")
    kvs.Initialize(xui.DefaultFolder, "XXX.dat")
..where the X's are of your choice.

The code in the sample.zip is correct and includes these two lines.
 

teddybear

Well-Known Member
Licensed User
Did you have a crashed log? post it.
 
Last edited:
Upvote 0

Acuario

Member
Licensed User
Longtime User
Adding the 2 lines above as shown in B4XPage_Created solved the problem - I just posted this for anyone who might experience the same problem - and in the hope that the sample code would be amended.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
Adding the 2 lines above as shown in B4XPage_Created solved the problem - I just posted this for anyone who might experience the same attachedproblem - and in the hope that the sample code would be amended.
I guess that you copied the sample code to your project instead of the attached example . the sample codes are code snippets which not include B4XPage_Created. the 2 lines you mentioned have been contained in the project.zip
 
Upvote 0
Top