B4J Question [ABMaterial] How to load ABMLabel content from file stored on the server?

mindful

Active Member
Licensed User
By content do you mean the Text prooperty? If so you need to read the file (File.ReadString), pass the result to a string variable and set myABMLabel.Text = myStringReadFromFile

If you meant the whole object... I think you need to use the B4XSerializator, convert the object to bytes then using StringUtils Convert the bytes to a string and save that to a file on disk. When you need to load the object you do the same thing backwards, read the file, decode the base64 string into bytes and after that you convert bytes to object using b4xserializator and finally you pass that object to the abmlabel ... someone please correct me if I am wrong about this one, because I haven't tried it yet ...
 
Upvote 0
Top