This is more to Digital Man but you never know...
I want to update the descriptions for all the directories in a library. I am reading in line by line from a file ...anyway...
I tried updating
file_area.lib[libname].dir_list[i].description
Where libname is the library I'm updating and i is the index of the directory I want to update. Not working, no error but also no change.
I guess I can do it by updating the .ini file but that seems a bit clunky and I'm sure there's a better way.
Open to advice...
file_area.lib[libname].dir_list[i].description
That's a read-only JavaScript property. Writing to it won't do anything.
Editing the msgs.ini file is the only way (either manually or via JS). I'd recommend using cfglib.js, but it hasn't been extended to support the msgs.ini file yet. :-(
Re: How to update file directory descriptions?
By: Digital Man to nelgin on Sun Nov 03 2024 11:54:16
file_area.lib[libname].dir_list[i].description
That's a read-only JavaScript property. Writing to it won't do anything.
I figured after reading the small print. I lamented about it on irc...
Editing the msgs.ini file is the only way (either manually or via JS). I'd recommend using cfglib.js, but it hasn't been extended to support the msgs.ini file yet. :-(
Sounds like an opportunity for improvement either by having access to write to object or some other method?
cfglib.js could (and someday will) be updated to support modifying msgs.ini files, but that's probably about it. That'll make updates via JS a little easier, but if you look at init-fidonet.js, it's not that hard to using the File object as is.
There are *tons* of read-only properties in the Sync JS object model that reflect the sysop configuration. I'm not about to make all of those properties writable (and put in the back-end work to update all the right config files any time they're changed). That would be a ton of work and additional code for every little gain.
Re: How to update file directory descriptions?
By: Digital Man to nelgin on Sun Nov 03 2024 15:39:07
cfglib.js could (and someday will) be updated to support modifying msgs.ini files, but that's probably about it. That'll make updates via JS a little easier, but if you look at init-fidonet.js, it's not that hard to using the File object as is.
Actually, that'd be file.ini right?
Sysop: | MarisaG |
---|---|
Location: | South San Francisco, CA |
Users: | 81 |
Nodes: | 15 (0 / 15) |
Uptime: | 153:46:03 |
Calls: | 1,431 |
Calls today: | 1 |
Files: | 7 |
Messages: | 22,128 |