05-27-2020, 06:41 AM | #1 |
Banned
Join Date: Dec 2018
Posts: 642
|
REAPER 6.11 numbers reaper-menu.ini file incorrectly
As of 6.11 the reaper-menu.ini file is being sorted incorrectly.
The item_nnn identifier at the beginning of each line is being sorted by alpha instead of by number. While internally in REAPER it still works, this causes problems for anyone who has written software that expects the reaper-menu.ini file to be ordered the way it has always been ordered. So instead of sorting 0,1,2,3,4 ... it sorts 0,1,10,11,12,... |
05-27-2020, 09:01 AM | #2 |
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,762
|
One shouldn't rely on a specific order of entries in a "classical" ini file.
Best way would be to read the file and order it in your script/program by yourself so you can be sure to have full control over the read data and its ordering. This counts for all ini-files in Reaper, which can be unordered by the user by hand as well, not only by Reaper itself.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - ReaGirl - a GuiLib for guis working for blind people |
05-27-2020, 09:28 AM | #3 |
Administrator
Join Date: Mar 2007
Location: NY
Posts: 16,518
|
MAM is correct, you shouldn't rely on any sorting in ini files, but thank you for pointing out that this changed, because it was unintentional. We'll restore the behavior for the next release.
|
05-27-2020, 10:37 AM | #4 | |
Banned
Join Date: Dec 2018
Posts: 642
|
Quote:
Clearly a bug. Thank you for fixing the bug. |
|
05-27-2020, 11:06 AM | #5 |
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,762
|
There is no such ONLY order. It just happened to be one used by Reaper but still, you shouldn't rely on it as ini files aren't designed as such.
So it's not a bug, it's how inifiles of that design work in any app who use them and you need to take care of that. It would be a bug, if the file wouldn't work but it does. It's just not your preferred order. Keep in mind that Reaperusers may edit the file by hand, distorting the ONLY order. Your code needs to take care of these things as it's not uncommon in the Reapercommunity. So make your code accept the file in any order to be safe of any possible circumstance that could occur. This makes your code rocksolid and saves you from doong edgecase-debugsessions. Have you looked into using the SWS-functions who access ini-files? They may help you getting over potential order problems. Just look for functions with ProfileString in their names.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - ReaGirl - a GuiLib for guis working for blind people |
05-27-2020, 11:16 AM | #6 | |
Banned
Join Date: Dec 2018
Posts: 642
|
Quote:
There obviously is a defined order. That’s why the lines are numbered. Deny the obvious all you want, but it doesn’t change reality. If it’s not a bug then why is @schwa fixing it??? |
|
05-27-2020, 11:30 AM | #7 |
Administrator
Join Date: Mar 2007
Location: NY
Posts: 16,518
|
Not everything has to be a fight.
If you are parsing .ini files, you should be aware that entries can be in any order and there can be blank lines. This is true in general for any application that uses .ini files, and it is true for all REAPER .ini files... ... except this one file, reaper-menu.ini. REAPER does write this file in a particular sorted order as an optimization when parsing the file, and it's a bug that that sorting order changed, so thank you for reporting it. |
05-27-2020, 11:56 AM | #8 | |
Banned
Join Date: Dec 2018
Posts: 642
|
Quote:
And I agree that not everything has to be a fight. That is precisely why it's better not to accuse customers who have reported a rather obvious bug of being incorrect and claiming it's not a bug, but rather an "unintended change", and on and on with the blame-the-customer-first school of customer support. I appreciate the fast response. |
|
05-27-2020, 02:38 PM | #9 | |
Human being with feelings
Join Date: Dec 2011
Location: Finland
Posts: 793
|
Quote:
That's the basics of any data handling. You're in the wrong in making an assumption, regardless if the change in sorting was "unintended behaviour", there's no guarantee for the sorting and it can change at any time... First step to failure is making an assumption. I should know, i learned it the hard way. (Yes, I'm a programmer, even if not a professional one) So don't take things personally, but learn from them. If you take something personally or start to feel entitled to something, you're on the wrong road. That's how fights start |
|
05-28-2020, 06:03 AM | #10 | |
Banned
Join Date: Dec 2018
Posts: 642
|
Quote:
Again, as @schwa noted, it will be fixed, so it clearly is a bug. If it wasn't a bug, it wouldn't need fixing, now would it? And I nor you would want the devs wasting their time fixing non-bugs would we? (last post on this subject) |
|
05-28-2020, 06:44 AM | #11 |
Pixel Pusher
Join Date: Mar 2007
Location: Blighty
Posts: 5,215
|
Please don't ever get into theming.
__________________
The House of White Tie |
05-28-2020, 11:50 PM | #12 |
Human being with feelings
Join Date: Jan 2013
Posts: 163
|
|
Thread Tools | |
Display Modes | |
|
|