S T R U C T O R I Z E R

GNU General Public License



Read here ...
#17: Diagram option will not be saved
Priority: 
normal
Status: 
closed
On 2009.10.01@10:22:51 amarradi 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 2009.10.02@11:43:09 bob 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 2009.10.03@20:25:26 bob 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 2009.10.06@10:37:11 amarradi wrote:
which folder should contains the INI File, i can't find. I work with fu** Windows Vista. Thats the Problem i think.
On 2009.10.06@11:08:19 amarradi 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:
C:Users
adischm/.structorizer
Thats the Saveproblem i think.
On 2009.10.08@11:01:31 amarradi 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 2009.10.18@13:35:30 bob wrote:
Ok I've added your requested change and will post Version 3.17 shortly. I hope this helps ...

=> OK for 3.17
On 2009.10.18@18:33:27 amarradi wrote:
Hello,

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 2009.10.18@19:02:04 amarradi 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 2009.10.19@09:15:58 bob 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 2009.10.19@09:21:59 bob wrote:
I've uploaded a new build of version 3.17 ...
On 2009.10.20@08:40:05 amarradi 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 2009.11.04@12:30:18 bob wrote:
I'll need to check this ...
On 2009.11.15@13:29:05 bob wrote:
Fixed by amarradi himself ;-)