An Extension Nobody Asked For (SuperINI)
Hello,
It has been said many times recently that INI files are dead and that XML is the replacement. However, I have always liked INI files. They are so simple but they are structured enough to actually be useful.
Back when I used Jamagic I created an object called “Super INI” that could do a fair few things that the standard INI object could not. Listing the groups and items was the most important. This is a port of that object with a load of new features thrown in. Perhaps it will surprise you that there are so many things.
Whilst it is an object nobody asked for, and an object I suppose not many people really want, I think it will be useful to have it. I found in Jamagic that once Super INI existed, I started designing my programs around the extra features a bit. It did prove useful to me. Maybe this MMF version will prove useful to others in the same way.
This is a version that works for MMF1.5. I do tend to convert it to MMF2 but I thought it was worth showing you all now. It comes with a ‘tour’ that explains the main features of it. It would be nice if people had a read through of it and looked at the available actions and expressions and conditions and gave an opinion. It is too late for new features though I think.
I have left out the save object feature since I could not be bothered to write it if I just have to rewrite it for the MMF2 version (the same would apply for save global values, but being lazy hadn’t occurred to me at that point). Also the file size is quite big at the moment. Probably because I’ve included too many standard libraries. I will worry about that later. The filters in the file selectors are incorrect too. All the features did work at some point and still do unless I’ve broken them with the exception of Get Value, as mentioned in the notes text file that is in the ZIP.
Please give feedback!
Download
Re: An Extension Nobody Asked For (SuperINI)
Very cool
I look at it this afternoon.
Re: An Extension Nobody Asked For (SuperINI)
I don't have MMF1.5 on this computer so I haven't tried it yet, but can there be more than one group with the same name? This could be useful if for example you are making a level editor. Something that in XML would look like
Code:
<root><light radius=10 /><light radius=5 /></root>
would in "Super INI" look like
Code:
[light]
radius=10
[light]
radius=5
In applications that handle files (text editors etc) it could be useful to store the last accessed files, like
Code:
[lastfile]
filename=C:\file1.txt
[lastfile]
filename=C:\file2.txt
Re: An Extension Nobody Asked For (SuperINI)
From memory, - No you couldn't have two groups with the same name.
The ini search algrithm is quite simple, it looks for the first occurance of the group and then proceeds to do the writing to the group.
Re: An Extension Nobody Asked For (SuperINI)
The object itself does not allow multiple groups or items with the same name (as it does not make sense), however I have thought of the situtation and the "Repeat mode" setting can do what you like. What it does is renames duplicate items or groups. For instance:
[group]
item=1
item=2
item=3
Might be loaded as:
[group]
item=1
item.1=2
item.2=3
and then there is a function which easily searches for all items which are in the form X or X.n. The same can happen for groups.
To find out more about this go to the demo project, look at the tour and click the "Repeats" topic. The last page of that topic also has a little place you can experiment with the settings.
"The ini search algrithm is quite simple, it looks for the first occurance of the group and then proceeds to do the writing to the group."
I'm not sure what you are talking about? The search feature in SuperINI is this? I'm not sure what you are talking about with writing. *confused*
Re: An Extension Nobody Asked For (SuperINI)
I'm going to university on Saturday so I won't be about for a while afterwards I suppose. Does anyone have anything to say about it? Should it be converted for MMF2 for a bonus pack or just released as a MMF1.5 thingy?
Re: An Extension Nobody Asked For (SuperINI)
[]I'm going to university on Saturday so I won't be about for a while afterwards I suppose. Does anyone have anything to say about it? Should it be converted for MMF2 for a bonus pack or just released as a MMF1.5 thingy? [/]
You should convert it for MMF2 (or ask me to).
Re: An Extension Nobody Asked For (SuperINI)
> (or ask me to)
Joshtek, would you please to convert this extention to MMF2 for me? (I don't have MMF2)
Re: An Extension Nobody Asked For (SuperINI)
If nothing is gonna happen to this I'll just release it for MMF1.2 and 1.5.
Re: An Extension Nobody Asked For (SuperINI)
Quote:
Originally Posted by Jax
> (or ask me to)
Joshtek, would you please to convert this extention to MMF2 for me? (I don't have MMF2)
Sure. I'd need the source, tho.
Re: An Extension Nobody Asked For (SuperINI)
Okay I'll try and catch you on MSN sometime.
Re: An Extension Nobody Asked For (SuperINI)
Quote:
Originally Posted by Jax
Okay I'll try and catch you on MSN sometime.
Or send it to my private e-mail address, joshtek@gmail.com :).
Re: An Extension Nobody Asked For (SuperINI)
Re: An Extension Nobody Asked For (SuperINI)
Hey, sorry about the delay, university keeps me very very busy, occupying just over all my time, and then I got Glandular Fever, which is rubbish and I strongly recommend everybody to avoid.
Anyway, here is the start of a port to MMF2.
Stuff which is missing:
- Things which didn't port right away to MMF2 (Global values and saving objects and Get Memory Address)
- Some initialisation stuff, which will probably need the properties pane
- Examples and things, because MMF2 didn't want to open them for some reason (Claiming I was missing SuperINI.mfx, but it is clearly there!). The example included doesn't do much and is MMF2-Dev only
- My notes for the object, which are on the other computer.
I don't expect anybody to really play with it much (they might find bugs if they do, uh-oh) but it’d be interested to hear if they thought it was useful. (Unless they don't think it is useful, in which case I would be less interested to hear their opinion)
Thanks very much to Andos for hosting it: http://andos.stiaxies.net/stuff/jax/SuperINIEarlyPreview.zip
Re: An Extension Nobody Asked For (SuperINI)
Well sorry to hear about the Glanduar fever. Yeah univerity does keep you busy.
When your ready to release, you might like to create the documentation with the Wiki in mind.
Just let me know when your ready I can set up the template for the page etc.
Also I noticed your page http://www.clickwiki.info/index.php/Jax needs to be templated. I do that when I get a chance.
Its a good way to promote yourself and the work that you've done.
Re: An Extension Nobody Asked For (SuperINI)
I think this extension could be very interesting. :)
When it will be ok (after some tests) I'll probably use it. :)
But don't forget to build in "release_small" and "runtime_small" versions your extensions. One for edit-time and the other for standalone applications. ;)
Re: An Extension Nobody Asked For (SuperINI)
I did something to the Wiki page but it is probably more messy than it started of as. Possibly has a little more information though. I wrote a little information about myself but it should probably be in third person. Clearly I cannot do that though. I'd feel silly.
This object fulfills the wish on the wiki btw:
INI Parser
This was going to be a simple extension for getting the names of all the groups and items in an INI file.
I'm glad you think so Sphax =) I will do the *_small stuff when it is nearer release.
Re: An Extension Nobody Asked For (SuperINI)
Don't worry Jax, don't feel silly, it takes practice to edit a page, and to know how to make it look good. I've since added a template to the page and jazzed it up a little.
http://www.clickwiki.info/index.php/Jack_Webster
In any case Jax your little modification and my editing made me stumble upon the old Extension Wiki, which I was able to rescue two of the tutorials written almost fully in tact except for a couple of pictures. Which is fantastic. When I get a chance I will upload them in Wiki format for all of us to enjoy again.
Oh and thanks for sharing the new extension, nobody knew about. I'll announce it tomorrow on the Wiki, I've run out of time today.
Re: An Extension Nobody Asked For (SuperINI)
The old Extension Wiki was mostly by Vortex. I think he intended to put them up somewhere again. You might need to ask him though. I should have the images and things somewhere, so assuming Vortex is okay with it, I can give you those.
Yeah thought I may as well mention that extension there. It was made on request from this thread, and is named after the person with the silly name that requested it. It didn't really fel worth mentioning much.
I like the clickwiki though. It's cool.
Re: An Extension Nobody Asked For (SuperINI)
Well I got most of the pages and graphics, there was just one page.
When I put the pages up,
Yes I know Vortex wrote most of the pages, so I will PM him about posting it.