GNU General Public License

Read here ...
#17: Diagram option will not be saved
On wrote:
I found out in this moment, that the diagram option "show comments?" will not be saved. Is it possible to upadate the xml structure for the Diagram option. An Other way is to save the options glabal for all files. (ini-file, sqlite,...)
On wrote:
This option is a not related to the diagram but to Structorizer itself. This is why it is saved to the users settings (INI file) and not to the diagram itself.

I'll check the save procedure ...
On wrote:
I was unable to reproduce this bug. The "show comments?" state is saved to the INI-file as it should be and also restored upon the next launch.
On wrote:
which folder should contains the INI File, i can't find. I work with fu** Windows Vista. Thats the Problem i think.
On wrote:
I have downloaded the source and can't find a bug. But now i find the structorizer.ini. Thats cool. But. I tried to unset(!) the "comment-flag". So found out following.
The unset will be saved in the ini. (showComments=0). Then i started the structorizer again. The unset is zero. I opend an .nsd-file The ini will be changed and in Notepad++ i see that (showComments=1). With opening the ini-file will be saved. Its an Vista Bug i think, but why.
So i tried system.out.println(dirname).
The Output:
Thats the Saveproblem i think.
On wrote:
My Solution for this Problem is
dirname = System.getProperty("user.home")+System.getProperty("file.separator")+".structorizer";
I hope thats correct.

Many greetings

Marcus Radisch
On wrote:
Ok I've added your requested change and will post Version 3.17 shortly. I hope this helps ...

=> OK for 3.17
On wrote:

i've test it! Thats it. But i found out same problem. THATS MY MISTAKE! Sorry.
I've ignored that the structorizer build the filename in an new variable and there is the same thing with the +"/"+ hard coded.

filename = dirname+System.getProperty("file.separator")+ininame;
is better

the best way is in my opinion is to build in in only one variable.
The Advantage is the the structorizer has only one file to create.

Many Greatings

Marcus Radisch

On wrote:
I found out an new Thing but i have now solution and no idea
In the top is this definition
private static Ini ini = null;

then the definition
public static Ini getInstance()

if (ini==null)
//add from amarradi begin
System.out.println("Output: "+ini);
//add from amarradi end
ini = new Ini();
return ini;

Always the ini is null, so anytime the ini will be calles and written new i think.

The output is always(new software run) null
On wrote:
You are right. There was one more hard coded "/".

What you've found concerning the "Ini" class is nothing unusual. This class follows the "singleton pattern". This means, that there can only be one instance of this class. Upon the first call the object is created. All later calls do refer then to this object.
On wrote:
I've uploaded a new build of version 3.17 ...
On wrote:
That right the File will now be saved and loaded :)
But i have an strange Problem with this feature. Let me describe
1. I open strurctorizer 3.17 with showComments = 1 and set it off and save the preferences and close it
2. I reopen the structorizer with showComments = 0(the ini-file show it also) The Comments ar off
3. The Notepad++ is open with the ini-file
4. I open an Structogram with Comments. The normal way is that the Comments are off. But the ini-file will be written(after opening) new with showComments = 1
That is strange is it in opening Bug or an saving bug?

Many greetings
On wrote:
I'll need to check this ...
On wrote:
Fixed by amarradi himself ;-)