I have used TIniFile for saving application data. Now I want to try TMemIniFile.
Where can I found good tutorials about them?
If you know how to use TIniFile, then there's nothing much more to learn about TMemIniFile. Use it in exactly the same way.
The only difference you need to be aware of is that any modifications you make are cached in the memory and not written to the file immediately. When you are ready to write them to the file just call UpdateFile.
That really is all there is to know!
Related
Hey at the moment I'm learning Swift and started to create an App for that. Everything is fine and I think I know the basics now. In that App, I use CoreData to save my Data but I would like to Sync that across Devices
Is there a way with Icloud to do that, I found there is something called "Core Data Ensembles" But is there a better way, or should I use the IcloudKit, if I can do the same things in IcloudKit with the relations like in coreData.
I just found old posts about that, so maybe there is a better way to do this.
Thanks in advance
Such synchronization works without any libraries involved. The main trick here is to place SQL file (or whatever you use for storing data) into a special folder that is going to be synced, so-called ubiquity container, and specify path to it for your persistent store coordinator. Here you can check high-level description of how it works, and there are a lot of step-by-step tutorials about it, e.g. here.
Hi take days looking information about this and I have found absolutely nothing, is there app like Onavo using a proxy, but some do not and I need to know how much data I'm consuming at one point to see if it is producing for such a shock, I need a lot of help if they have some information please help. for example:
I'm a Delphi programmer.
I want to fill the entire free space of a storage device with dummy file(s).
During this operation I want to prevent that Windows or other programs write on the device.
I know it is doable because I have seen programs that do it.
I already have the code to create the dummy files (using TFileStream, very fast on NTFS) so all I need is some sort of lock/unlock code.
Does someone know a way..?
Thank you for any suggestion.
I will accept even solutions that will change the way I create those files, provided that the entire program will work better.
Thank you.
Best regards, John.
There's a SetEndOfFile function which is presumably transactional (i.e. it either succeeds or fails), which I think (I haven't tested/checked it) you can use to grow a file to fill available space.
I am writing a very simple application, for the iPhone. Unfortunately I am really a newbie.
What I am trying to do is to save data at the end of a user experience. This data is really simple, only string or int, or some array.
Later I want to be able to retrieve that data, therefore I also need an event ID (I suppose).
Could you please point out the best way, API or technology to achieve that, XML, plain text, serialization... ?
Use NSUserDefaults. Straight forward and easy to use. This will handle all File I/O for you, and takes only a couple lines of code.
NSUserDefaults is a good choice for small amounts of data.
If you need to manage something larger than a kilobyte or so, you might consider using the initWithContentsOfFile: methods of NSArray or NSDictionary to read in a .plist file. To write the file, use the writeToFile:atomically: methods. This file needs to go in your app's documents directory.
Me and my team created a simple class for this purpose which as Mark pointed out makes use of NSUserDefaults. Hopefully this helps you out...
http://getsetgames.com/2009/10/07/saving-and-loading-user-data-and-preferences/
I need to be able to find the current time from an online source rather than the system to make sure the time is correct. I need to do this in actionscript, preferably 2 rather than 3 though if you have any solution at all post it. Thanks ahead of time for the help.
Here's a possible reference: http://board.flashkit.com/board/showthread.php?t=663535
The easiest is solution is probably as above, to create a server-side script to return the time and then fetch that in your ActionScript.
Another option is to create an NTP client in ActionScript. Unfortunately it's been a while since I've done any ActionScript, but here's a straightforward example in Python if anyone wants to do a port: http://maxinbjohn.blog.com/2366141/