B4A Question Troubles with custom type and File.ReadMap, File.WriteMap - DonManfred (first post)    Jun 17, 2018   (1 reaction) https://www.b4x..png File. WriteMap (Dir As String, FileName As String, Map As Map)
Creates a new file and writes the given map. Each key value pair is written as a single line.
All values are converted to strings. B4A Question How can I Manage the Itemclick of the Customlistview created by map? - Mahares (first post)    Feb 27, 2022   (3 reactions) You cannot use File.ReadMap and File.WriteMap because your values are lists not strings. You have to use Serializator (need RandomAccessFile lib) to save the file and retrieve it.. See below code:
' Write map to file
Dim ser As B4XSerializator 'you need RandomAccessFile lbrary checked
Dim ty B4A Question Save Map with custom Type to file - DonManfred (first post)    Sep 29, 2022   (1 reaction) It will be ALL STRINGS after you save it this way.
https://www.b4x..png File. WriteMap (Dir As String, FileName As String, Map As Map)
Creates a new file and writes the given map. Each key value pair is written as a single line.
All values are converted to strings. <--- !!!
Use B4XSerializator to B4A Code Snippet External Storage Extras - max123    Apr 14, 2023   (4 reactions) This format makes it easy to edit it manually. ' One common usage of File.WriteMap is to save a map of "settings" to a file. 'Reads the file and returns its content as a string. 'Example:<code> 'Dim text As String = Storage.ReadString(Storage.Root, "myfile.txt")</code> Public Sub R B4A Question XML -> MAP issue - William Lancee (first post)    Dec 17, 2023   (3 reactions) File.WriteMap converts all values to a string and saves one key: string-Value as a pair on each record/line in the file.
The List is converted to a string. When read it is still a string. When you log the list and string they look the same.
You need to use the B4XSerializator from the internal Ra B4A Question "compiletime.jar" does not store the correct time. - rosippc64a (first post)    Jul 10, 2021   (2 reactions) The comment line is from file.writemap(). It is autmatically saved. B4A Question Using correctly File.WriteList - GiovanniPolese    Jun 02, 2024 Hi. My problem is to write on disk various Lists, in sequence, on same file. The saving sequence is: File.Delete(InternalWorkDir,FileUndo) File.WriteList(InternalWorkDir,FileUndo,Layers) File.WriteMap(InternalWorkDir,FileUndo,colorMap) b=rvs.ConvertObjectToBytes(layerMap.Size) ' jus B4J Question [SOLVED]Inno Setup Problem - Zvi (first post)    May 31, 2023   (3 reactions) Brilliant! Thanks so much, both Chris2 and Magma. I used Dim UserDir As String = File.DirData("Checkers") for both read and write (obviously :) ) File.Writemap(UserDir, "NmicroCore", Main.checkers) Works perfectly. Saves the data file in AppData\Roaming (see attachment). B4A Question Application initialization file - Sergey_New    Jul 17, 2024 When I first launch the application I create a file
File.WriteMap(File.DirInternal, ProgName & ".ini", options)
On a device with Android below 14, this file could be deleted when clearing the cache and application data. Now it doesn't work. How to delete this file? B4J Question This logical conversion won't work. Why? - Erel (first post)    Nov 01, 2016   (1 reaction) File.WriteMap creates a text file. It will not work with raw bytes. You should use BytesToFile isntead: https://www.b4x./#content Page: 1   2   3   4   5   6   7   Powered by ColBERT |