MantisBT - mSLDev
View Issue Details
0000156mSLDevGUI Relatedpublic2013-05-13 03:552013-05-13 19:52
user36 
 
normalminoralways
newopen 
Win7 64-bitWindows 7(6.1)
 
 
0000156: Other topics in the INI file appear while editting a script
items that arent under the [script] topic appear in the editor.
1) Add another topic to the ini file

[topic]
text=text

2) Open in mSLDev

"text" will appear above or below the script depending on its position in the INI file relative to [script]
No tags attached.
Issue History
2013-05-13 03:55user36New Issue
2013-05-13 04:03user36Note Added: 0000092
2013-05-13 15:03administratorNote Added: 0000093
2013-05-13 19:35user36Note Added: 0000094
2013-05-13 19:52administratorNote Added: 0000095
2013-05-13 19:53administratorNote Edited: 0000095bug_revision_view_page.php?bugnote_id=95#r66
2013-05-13 19:53administratorNote Edited: 0000095bug_revision_view_page.php?bugnote_id=95#r67

Notes
(0000092)
user36   
2013-05-13 04:03   
Didn't catch it before but if you save after opening it like this. It saves the whole thing under [script] and removes the other topics.
(0000093)
administrator   
2013-05-13 15:03   
Why do you have other sections anyway? on save, the file is purged and rewritten to; hence the results you see.
(0000094)
user36   
2013-05-13 19:35   
I had seen a script before that saved its settings to itself under a different topic. I thought that was a cool idea because then you don't have to deal with two files and can just reference it with $script.
(0000095)
administrator   
2013-05-13 19:52   
(edited on: 2013-05-13 19:53)
That sounds like a horrible idea from a design point of view.

It prevents the ability to copy and drop the code into existing script files. Such scripts would also certainly fail if the user has check file monitors every time. Attempting to work around that issue using /reload or /load doesn't solve it [yet*] either.

* As a side note, I've reported the workaround as a bug a while back (http://forums.mirc.com/ubbthreads.php/topics/240427/reload_and_file_changed_dialog [^]) and it is fixed in the current beta (7.31, http://forums.mirc.com/ubbthreads.php/topics/225704/mIRC_beta#Post225704 [^] (Item number 7)). However it still halts the code when you execute reload, therefore one would also have to accommodate the script with an on load event as well if executing more code is desired.

I will take a look at supporting additional sections.