0_o Posted November 11, 2018 Report Share Posted November 11, 2018 (edited) Hi, I tried using the openg ini vis and here is my two cents feedback: 1. Read operation locks the file and doesn't open it as read-only, thus, blocking a write operation. There is no permission or access handling in the package 2. Even though a numeric variable should be represented as 4 and not as "4", for example, inside a cluster every variable is represented with " around it 3. Read/Write panel from/to ini is a great concept yet it needs to be debugged. I saw strange results from variant controls for example that got 2 lines but I wonder if it can deal with two controls with the same label, for example. 4. It would be nice if the open could have got a file reference from the general file open vi that will handle permission settings or any other file operation before the openg gets involved. 5. Some VIs require a type input yet even after they know the output type they still give out a variant. Maliablle VI? Edited November 11, 2018 by 0_o Quote Link to comment
hooovahh Posted November 12, 2018 Report Share Posted November 12, 2018 Those are all great suggestions. The read/write panel could have other improvements too a list of controls to exclude, or an option to exclude indicators. Do we really need to read and write the Error In/Out? Most likely no. The core of the code is using NI's configuration functions, which are fine for small files but for arrays of clusters of arrays it struggles. OpenG Read/Write takes a long time for large data types that are heavily nested, or array based. The MGI Read/Write Anything work much better when it comes to this. Quote Link to comment
Michael Aivaliotis Posted November 12, 2018 Report Share Posted November 12, 2018 Do people still use ini files? I mean XML, Json? What is the consensus. Should any effort be put into this? Yes, the MGI tool is way faster. Yes, I'm derailing this post... Quote Link to comment
crossrulz Posted November 12, 2018 Report Share Posted November 12, 2018 Yes, I still heavily use ini files. Admittedly, I am starting to transition my code to use XML. Quote Link to comment
Tim_S Posted November 12, 2018 Report Share Posted November 12, 2018 1 hour ago, Michael Aivaliotis said: Do people still use ini files? I mean XML, Json? What is the consensus. Should any effort be put into this? Yes, the MGI tool is way faster. Yes, I'm derailing this post... Whenever I have something that an average human is going to edit I use INI files. It's a lot harder to completely mess up and easier to understand for non-software types. Otherwise, I've shifted to JSON. Quote Link to comment
0_o Posted November 13, 2018 Author Report Share Posted November 13, 2018 Since you asked... I personally don't use ini files. I use MVC and thus all my controls are also in a class. I use traverse and save the class as a binary file. For config I use JSON or SQL. However, some projects demand ini file config so here we are Quote Link to comment
hooovahh Posted November 13, 2018 Report Share Posted November 13, 2018 I still have some legacy stuff that uses INI keys. The users I trust, know how to edit them pretty easily. Not saying they can't do the same for JSON but it is a more familiar looking format. It's good and bad, but every operating system has a text editor. Quote Link to comment
Porter Posted November 13, 2018 Report Share Posted November 13, 2018 I actually still use the OpenG ini library for a lot of my config files. As I recall, it's output was a bit more human-readable compared to the MGI ini format. Recently I've started to look at TOML as a possible replacement: https://github.com/erdosmiller/lv-toml Of course JSON or XML could also work very well but they look a bit more intimidating to the non-technical user. 1 Quote Link to comment
Gribo Posted November 13, 2018 Report Share Posted November 13, 2018 I use JSON almost exclusively. A verbosely formatted JSON file is more readable than an INI file. Also, With JDPowell's JSON library, saving and loading any LV type is a breeze. 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.