This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 4 - Pages: 1 - Last Post: 28-Apr-2018 13:33 Last Post By: AndreWolff
AndreWolff

Posts: 1,740
Registered: 14-Dec-2007
Missing “Save changes?” pop-up
Posted: 27-Apr-2018 19:08
 
  Click to reply to this thread Reply
I just added a new variable to my skin with next code in onload.bsh:
	JComboBox captionTransparency_jg = new JComboBox(new Object[]
	 { "0", "10", "20", "30", "40", "50", "60", "70", "80", "90", "95", "100" }
	);
	captionTransparency_jg.setSelectedIndex(6);
If I change the value for an existing album from 60 to 100 and next close jAlbum, there is no question “Save changes?”.
If I next open the project file again, the program shows the old default value 60 instead of the expected value 100.
Next I change the value again into 100 and call the save action via the menu and close jAlbum.
If I next open jAlbum again the saved value 100 is shown and after a next cahnge and close the “Save changes?”. pop-up shows up.

Why is there no “Save changes?”. Pop-up when I closed jAlbum after I changed the value the first time?

Jalbum versioin 15.3.4 and Windows 10.
RobM

Posts: 3,086
Registered: 4-Aug-2006
Re: Missing “Save changes?” pop-up
Posted: 27-Apr-2018 19:55   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Duplicate question which contains the answer
AndreWolff

Posts: 1,740
Registered: 14-Dec-2007
Re: Missing “Save changes?” pop-up
Posted: 28-Apr-2018 09:37   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Duplicate question which contains the answer
No this is different, I did what was advised in that thread and in your documentation: Default values should always be specified

That thread, the current thread and this thread shows that there is a fundamental problem in the input validation of jAlbum: I changed a value from 60 to 100, but this is not detected if I close the application!
RobM

Posts: 3,086
Registered: 4-Aug-2006
Re: Missing “Save changes?” pop-up
Posted: 28-Apr-2018 12:06   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
To repeat, with yet another of your answered question you are not doing what is required and further you have said you won’t. If you won’t use the correct code you are on your own.
AndreWolff

Posts: 1,740
Registered: 14-Dec-2007
Re: Missing “Save changes?” pop-up
Posted: 28-Apr-2018 12:35   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
To repeat, with yet another of your answered question you are not doing what is required and further you have said you won’t. If you won’t use the correct code you are on your own.
I use the code as tested here, if that is incorrect, please tell me what the correct code is!

I don’t use a skinmodel file, because I don’t use compiled code. And I see no skinmodel file in the Minimal example skin, so it is apparently not recommended.

And after all jAlbum should just implement a good method to see if there is some unsaved input if the application is closed, independent of what other files are added A skinmodel file will not solve this problem.

Edited by: AndreWolff on 28-Apr-2018 13:32
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums