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


Permlink Replies: 21 - Pages: 2 [ 1 2 | Next ] - Last Post: 18-Oct-2019 14:39 Last Post By: jGromit
jGromit

Posts: 7,369
Registered: 31-Jan-2006
With interpreted onload.bsh, SkinModel.java is ignored
Posted: 28-Apr-2018 17:10
 
  Click to reply to this thread Reply
Not an issue for the majority of actively-maintained skins, which use a compiled UI, but in a skin with an old-school, interpreted onload.bsh, the contents of the SkinModel.java file are ignored. The Zigzag skin is a prime example - there are three booleans that should default to true, but they don't.

I'm fairly certain this used to work, but I can't pin down which jAlbum version caused it to stop working.

Edit: This appears to fail only in Windows, which points to a Java version problem (Windows is using Java 9, macOS is using Java 8).
davidekholm

Posts: 3,564
Registered: 18-Oct-2002
Re: With interpreted onload.bsh, SkinModel.java is ignored
Posted: 15-May-2018 14:05   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Thanks for reporting. What I actually observe on Windows 10 with Java 9 is that it takes two consecutive skin loads (not reloads) for the changes in SkinModel to kick-in. I currently don't know why that is.
AndreWolff

Posts: 1,749
Registered: 14-Dec-2007
Re: With interpreted onload.bsh, SkinModel.java is ignored
Posted: 17-May-2018 14:47   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I just replaced headless-settings.jap by the SkinModel.java file in my un-compiled skins.

Should I go back to the old situation with the headless-settings.jap?

Is the SkinModel.java file also working in case I replace BeanShell java by Javascript?
davidekholm

Posts: 3,564
Registered: 18-Oct-2002
Re: With interpreted onload.bsh, SkinModel.java is ignored
Posted: 17-May-2018 15:44   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
I just replaced headless-settings.jap by the SkinModel.java file in my un-compiled skins.

Should I go back to the old situation with the headless-settings.jap?


I recommend sticking with SkinModel. It's more powerful as it sets default types for your variables too.

Is the SkinModel.java file also working in case I replace BeanShell java by Javascript?

Yes. You can even have a BeanShell based UI (i.e. onload.bsh) and use JavaScript for the album processing. What needs to match is the language used in init (for instance init.js vs init.bsh) and the language used within index and slide page processing.
AndreWolff

Posts: 1,749
Registered: 14-Dec-2007
Re: With interpreted onload.bsh, SkinModel.java is ignored
Posted: 17-May-2018 17:51   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
I recommend sticking with SkinModel. It's more powerful as it sets default types for your variables too.
Well, if you think this is the recommended method, why is Monkeyboys tool not standardly delivered in the jAlbum tools directory?
davidekholm

Posts: 3,564
Registered: 18-Oct-2002
Re: With interpreted onload.bsh, SkinModel.java is ignored
Posted: 17-May-2018 19:42   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
davidekholm wrote:
I recommend sticking with SkinModel. It's more powerful as it sets default types for your variables too.
Well, if you think this is the recommended method, why is Monkeyboys tool not standardly delivered in the jAlbum tools directory?

It's probably a good idea. I had to adjust it a bit to make it work though.
monkeyboy

Posts: 95
Registered: 21-Jun-2008
Re: With interpreted onload.bsh, SkinModel.java is ignored
Posted: 17-May-2018 20:42   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I adjusted it a while ago, myself.
Just in case anyone is interested, attached is the version I currently use.
AndreWolff

Posts: 1,749
Registered: 14-Dec-2007
Re: With interpreted onload.bsh, SkinModel.java is ignored
Posted: 17-May-2018 22:53   in response to: monkeyboy in response to: monkeyboy
 
  Click to reply to this thread Reply
Should I remake the Skinmodel file with the new version, because of bugs in the old version?
monkeyboy

Posts: 95
Registered: 21-Jun-2008
Re: With interpreted onload.bsh, SkinModel.java is ignored
Posted: 17-May-2018 23:10   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
No need. The bug in the old version simply prevented the script from running at all.
If you were able to use the old version successfully, then the output generated would be identical to that generated by the new version.
davidekholm

Posts: 3,564
Registered: 18-Oct-2002
Re: With interpreted onload.bsh, SkinModel.java is ignored
Posted: 17-May-2018 23:20   in response to: monkeyboy in response to: monkeyboy
 
  Click to reply to this thread Reply
Thanks for the update
monkeyboy

Posts: 95
Registered: 21-Jun-2008
Re: With interpreted onload.bsh, SkinModel.java is ignored
Posted: 17-May-2018 23:28   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
You're welcome!
jGromit

Posts: 7,369
Registered: 31-Jan-2006
Re: With interpreted onload.bsh, SkinModel.java is ignored
Posted: 18-May-2018 06:02   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
I recommend sticking with SkinModel. It's more powerful as it sets default types for your variables too.

Is SkinModel.java used when running in console mode? I was under the impression that it was used only when loading the skin settings tab in the UI.
davidekholm

Posts: 3,564
Registered: 18-Oct-2002
Re: With interpreted onload.bsh, SkinModel.java is ignored
Posted: 18-May-2018 15:13   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
davidekholm wrote:
I recommend sticking with SkinModel. It's more powerful as it sets default types for your variables too.

Is SkinModel.java used when running in console mode? I was under the impression that it was used only when loading the skin settings tab in the UI.


No, SkinModel is loaded by the engine itself so it works both in console and UI mode.
jGromit

Posts: 7,369
Registered: 31-Jan-2006
Re: With interpreted onload.bsh, SkinModel.java is ignored
Posted: 18-May-2018 15:54   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Ah, I see. That means there's one more "before skin release" step that I can eliminate. :)
davidekholm

Posts: 3,564
Registered: 18-Oct-2002
Re: With interpreted onload.bsh, SkinModel.java is ignored
Posted: 18-May-2018 15:56   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Ah, I see. That means there's one more "before skin release" step that I can eliminate. :)

Yes, you can use either headless-settings.jap or SkinModel. No need to use both :-)
Legend
Forum admins
Helpful Answer
Correct Answer

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