[Request] Improved INI object
I sort of like the INI object as it is now, but using it slows down my application a lot when I need to deal with a lot of data.
I would like to see a new INI object that works identically to the existing one, but with the "Set INI file" action removed, and two others added instead:
* Load INI (From file to RAM)
* Save INI (From RAM to file)
The idea is that all conditions (set value, set string) should not modify the INI file, but instead just edit values in an array stored in the RAM, and load/save from that when you use the load/save actions.
This would be many times faster when writing and reading large INI files.
Re: [Request] Improved INI object
INI is a initialization File...
They Are Supposed to be used to save configurations, eg.
[save1]
questdone=Yes
It is not supposed to be used as an array...
if you really want it, you can easily use the string parser object (which keeps info in virtual memory) Then use the save as INI function.
Hope that helps :cool:
Re: [Request] Improved INI object
Re: [Request] Improved INI object
Re: [Request] Improved INI object
It's in one of the bonus packs.
Re: [Request] Improved INI object
Do those handle groups too?
Quote:
INI is a initialization File...
They Are Supposed to be used to save configurations, eg.
[save1]
questdone=Yes
It is not supposed to be used as an array...
No, but the whole concept of groups, items, and values/strings is perfect for what I want to store. Afaik the other extensions mentioned above does not support groups.
The named variable object would have to store the "group" name for each item (space waster), and most array extensions would have to allocate a lot of unnecessary memory, since all groups will have a different number of items.
Anyways, I might be wrong.
I need groups and items. Each group will store a variable amount of of strings and values (it can be 5, it can be 50), and both the groups and items must be titled. What other extension would allow me to do this?
Re: [Request] Improved INI object
A record extension would be useful. If anyone has ever used pascal or delphi they would know what I mean.
Basically you declare a file and you have records in a kinda stack. New records are added to the end of the file.. Heres a (graphical-ish) example:
RecordFile
-Record1
---String1
---String2
---Value1
---Boolean
-Record2
---String1
---String2
---Value1
---Boolean
-Record2
---String1
---String2
---Value1
---Boolean
etc etc. then u can get data by calling a specific file, then record, then the item name in the record. Now wouldn't that be a very useful and powerful extension?
Re: [Request] Improved INI object
*Cough* EasyXML *Cough*
<RecordFile>
<Record>
<StringVal1>IAMASTRINGVALUE</StringVal1>
<StringVal2>IAMANOTHERSTRINGVALUE</StringVal2>
</Record>
<Record>
<StringVal1>Blah</StringVal1>
<StringVal2>Meh</StringVal2>
</Record>
</RecordFile>
Ect :P .
Re: [Request] Improved INI object
Maybe I should have looked into xml a while back.. :D
Re: [Request] Improved INI object
the INI object DOES need expressions to find out how many groups there are, and how many items are in a given group, however
doing this manually isn't always the best option
Re: [Request] Improved INI object
yes, however given the HUGE over head and, slow reading/writing speed of INI i don't think this will really raise issues... because you cant use them for anything of volume anyway. hehe
i do still like the INI for it's easy interface... however you will find that you drift away from it and towards more fees able storage the more you use mmf.
keep clicking!:cool:
Re: [Request] Improved INI object
I've nearly finished an update of the Ini object. It will be released through CT at some point.
Re: [Request] Improved INI object
Quote:
Originally Posted by SEELE
yes, however given the HUGE over head and, slow reading/writing speed of INI i don't think this will really raise issues... because you cant use them for anything of volume anyway. hehe
i do still like the INI for it's easy interface... however you will find that you drift away from it and towards more fees able storage the more you use mmf.
keep clicking!:cool:
i really only use INIs since they can be easily edited in practically anything; arrays more or less force you to create an application just to edit them (which can be better depending on what you're storing), and/or even having to use a hex editor. i don't like XML as much since it seems bloated with all the closing tags it requires
Re: [Request] Improved INI object
yes XML also has downsides however the way XML is read/written is many many times faster.
also askII arrays as in delemetered strait text is fast and still allows you to modify the files without using mmf, eg... notepad.
example
ini version:
[save1]
name=andy
xposition=3361
yposition=963
level=6
askII array:
using ":" to delimate groups
using "," to delimate items
andy,3361,963,6: