Thread Locked This thread is locked - replies are not allowed.



Permlink Replies: 150 - Pages: 11 [ Previous | 1 ... 5 6 7 8 9 10 11 | Next ] - Last Post: 27 Sep 22, 21:55 Last Post By: davidekholm Threads: [ Previous | Next ]
PeterGibb

Posts: 332
Registered: 20-Nov-2009
Re: jAlbum on Java 18
Posted: 23 Sep 22, 20:33   in response to: JeffTucker in response to: JeffTucker
Well, I am very good at making a complete idiot of myself sometimes.

One thing strikes me though.

My MultiMaker window tells me that albums have been either made and/or published, so my question would be, does jAlbum really need to use the notifications area/icon AT ALL for this particular purpose...?

Because, as far as I can see, the notifications icon and the MultiMaker window seem to give out the same information.

All I look for is the green MultiMaker text colour change, indicating success or not.

The MultiMaker window is scrollable too, with the text colours being far more 'visible' in the informative sense.

Thats more than enough, for me

Peter

Edited by: PeterGibb on 23 Sep 2022, 19:34
AndreWolff

Posts: 2,504
Registered: 14-Dec-2007
Re: jAlbum on Java 18
Posted: 23 Sep 22, 21:40   in response to: PeterGibb in response to: PeterGibb
Glad that the scroll problem is confirmed by you Peter!

But there are more problems:

I remade all my PhotoSwipe sample albums with the Multi maker: two projects did give a crash: you see shortly a red notification.
The console windows shows an error for these two projects:
Stack trace for jAlbum 29b15 using skin PhotoSwipe 5.2.7:
 
se.datadosen.util.ScriptException: java.io.FileNotFoundException: I:\Users\Andre\Documents\Mijn websites\jalbum.net\PhotoSwipeVideoTest\res\homeBtn.svg (Bestand of map is beschadigd en onleesbaar) in init.bsh at line number 691
	at se.datadosen.util.ScriptException.of(ScriptException.java:59)

This button is made by a template file:
  if (homeBtnTemplate.exists())
  { 
    homeButton = "homeBtn.svg";
    engine.processTemplateFile(homeBtnTemplate, new File(resDirectory,homeButton));  // this is line 691
  }

If the Multi maker is ready, you can nowhere find these two red notifications.

It is a strange error, because with the other projects is the button correctly made by the same template file.

But if I run the same list of files with the Multi maker on my laptop with the last released version 28.1.6 there is no problem.

Edit:

More mysteries:

I tried again to make all PhotoSwipe sample albums with the Multi maker and this time there were no error!

But there is another strange warning:

The about page of all my skins contains a link to a history.txt file.
I can no longer open that history file in any skin, if I click on the link I see in the console window:

java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\Users\Gebruiker\AppData\Roaming\JAlbum\skins\PhotoSwipe/history.txt
 
java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\Users\Gebruiker\AppData\Roaming\JAlbum\skins\LightGallery/history.txt
 
java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\Users\Gebruiker\AppData\Roaming\JAlbum\skins\FancyBox/history.txt
 
java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\Users\Gebruiker\AppData\Roaming\JAlbum\skins\Slide%20Show%204/history.txt


That link is made in NetBeans:
 add("br", new JLabel("Version history:"));
JLinkLabel history = new JLinkLabel("history.txt");
 history.setURL(skinDirectory + "/history.txt");
 add(" ", history);


If I remove all text from file history.txt, I still get this warning!
Changing the file extension from .txt to .html makes no difference.

Here is another warning I see if I just open my video / audio test album. Making the album does not leads to problems as you see:
Skin loading: 0,545s
org.jsoup.UnsupportedMimeTypeException: Unhandled content type. Must be text/*, application/xml, or application/xhtml+xml. Mimetype=audio/mpeg, URL=https://andrewolff.jalbum.net/Music_tracks_PS/bensound-happyrock.mp3
org.jsoup.UnsupportedMimeTypeException: Unhandled content type. Must be text/*, application/xml, or application/xhtml+xml. Mimetype=audio/mpeg, URL=https://andrewolff.jalbum.net/Music_tracks_PS/bensound-happyrock.mp3

Making "VideoExif_PS" (Changes)
"VideoExif_PS" made in 2,745s

File bensound-happyrock.mp3 is not used in this project!

Edited by: AndreWolff on 24 Sep 2022, 08:28

Edited by: AndreWolff on 24 Sep 2022, 11:07

Edited by: AndreWolff on 25 Sep 2022, 09:16
davidekholm

Posts: 4,405
Registered: 18-Oct-2002
Re: jAlbum on Java 18
Posted: 26 Sep 22, 14:36   in response to: AndreWolff in response to: AndreWolff
Let's attack only one issue at the time André. Your file system is saying this: "Bestand of map is beschadigd en onleesbaar", which Google translates to: "File or folder is damaged and unreadable", so please check out the folder in question and also run a validity check on your file system.

On the notification issue (notifications lacking scroll bars). I thought I had added scroll bars, but now I remember that I struggled with painting/layout issues so I had to give up on them. I'll try to ensure that the MultiMaker better reports failures for you.

AndreWolff

Posts: 2,504
Registered: 14-Dec-2007
Re: jAlbum on Java 18
Posted: 26 Sep 22, 15:07   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
Let's attack only one issue at the time André. Your file system is saying this: "Bestand of map is beschadigd en onleesbaar", which Google translates to: "File or folder is damaged and unreadable", so please check out the folder in question and also run a validity check on your file system.
David that was already solved as I told above, but you see the other problem:

The about page of all my skins contains a link to a history.txt file.
I can no longer open that history file in any skin, if I click on the link I see in the console window:

java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\Users\Gebruiker\AppData\Roaming\JAlbum\skins\PhotoSwipe/history.txt


If I remove all text from file history.txt, I still get this warning!
Changing the file extension from .txt to .html makes no difference.
davidekholm

Posts: 4,405
Registered: 18-Oct-2002
Re: jAlbum on Java 18
Posted: 26 Sep 22, 16:17   in response to: AndreWolff in response to: AndreWolff
AndreWolff wrote:
davidekholm wrote:
Let's attack only one issue at the time André. Your file system is saying this: "Bestand of map is beschadigd en onleesbaar", which Google translates to: "File or folder is damaged and unreadable", so please check out the folder in question and also run a validity check on your file system.
David that was already solved as I told above, but you see the other problem:

The about page of all my skins contains a link to a history.txt file.
I can no longer open that history file in any skin, if I click on the link I see in the console window:

java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\Users\Gebruiker\AppData\Roaming\JAlbum\skins\PhotoSwipe/history.txt

If I remove all text from file history.txt, I still get this warning!
Changing the file extension from .txt to .html makes no difference.


Well, you're constructing a URI, but do not pass a valid string for it. URIs should either be a relative path or start with a protocol, then a colon, for instance file:/// or http:
davidekholm

Posts: 4,405
Registered: 18-Oct-2002
Re: jAlbum on Java 18
Posted: 26 Sep 22, 16:19   in response to: davidekholm in response to: davidekholm
To be specific. This call causes the trouble:

history.setURL(skinDirectory + "/history.txt");

Try history.setURL(new File(skinDirectory, "history.txt").toURI().toString());
AndreWolff

Posts: 2,504
Registered: 14-Dec-2007
Re: jAlbum on Java 18
Posted: 26 Sep 22, 17:55   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
To be specific. This call causes the trouble:

history.setURL(skinDirectory + "/history.txt");

I am using this already for 10 years in my skins and this works fine in the latest released version!

I copied this code from your Slide Show 2 skin!!
Try history.setURL(new File(skinDirectory, "history.txt").toURI().toString());
Yes that works OK in the beta for skins with a compiles GUI.
But for the Slide Show 4 skin, where the GUI is in file onload.bsh it is not working, so I removed the link.

Thanks for the solution of this problem!

Edited by: AndreWolff on 27 Sep 2022, 09:36
davidekholm

Posts: 4,405
Registered: 18-Oct-2002
Re: jAlbum on Java 18
Posted: 26 Sep 22, 18:22   in response to: AndreWolff in response to: AndreWolff
The requirements on how to create a correct URI might have been tightened in Java 18, which we're moving to now (or Java 19)
RobM

Posts: 4,380
Registered: 4-Aug-2006
Re: jAlbum on Java 18
Posted: 26 Sep 22, 20:59   in response to: davidekholm in response to: davidekholm
David, there is something I would like to see change in Settings>Images>Advanced?Output format area. Could that 'Output format' be changed to 'Output format for JPG/webP images'.
And the 'Force JPG/webP thumbnails/images' be given a label above them, like 'Other image formats PNG, TIFF, HEIC etc.'

Or anything that just makes it a bit more obvious that 'Output format' does not apply to all input image formats. The documentation covers it, but it might be friendlier if the GUI was clearer.
RobM

Posts: 4,380
Registered: 4-Aug-2006
Re: jAlbum on Java 18
Posted: 26 Sep 22, 22:14   in response to: RobM in response to: RobM
This used to work and the Toolkit API documentation looks the same
import  java.awt.datatransfer.*;
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
It now reports error
java.lang.reflect.InaccessibleObjectException: Unable to make public final
java.awt.datatransfer.Clipboard sun.lwawt.LWToolkit.getSystemClipboard()
accessible: module java.desktop does not "exports sun.lwawt" to 
unnamed module @1ddf84b8 
in Video GPS metadata simple.bsh at line number 230


Edited by: RobM on 26 Sep 2022, 21:16
Except for Java 18 now showing Toolkit is now Protected, protected Toolkit()
davidekholm

Posts: 4,405
Registered: 18-Oct-2002
Re: jAlbum on Java 18
Posted: 26 Sep 22, 22:19   in response to: RobM in response to: RobM
Attachment bsh-2.2.1.jar (390.3 KB)
RobM wrote:
This used to work and the Toolkit API documentation looks the same
import  java.awt.datatransfer.*;
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
It now reports error
java.lang.reflect.InaccessibleObjectException: Unable to make public final
java.awt.datatransfer.Clipboard sun.lwawt.LWToolkit.getSystemClipboard()
accessible: module java.desktop does not "exports sun.lwawt" to 
unnamed module @1ddf84b8 
in Video GPS metadata simple.bsh at line number 230

Works here. Did you try swapping lib/bsh-2.2.0.jar with the attached one?
davidekholm

Posts: 4,405
Registered: 18-Oct-2002
Re: jAlbum on Java 18
Posted: 26 Sep 22, 22:20   in response to: RobM in response to: RobM
RobM wrote:
David, there is something I would like to see change in Settings>Images>Advanced?Output format area. Could that 'Output format' be changed to 'Output format for JPG/webP images'.
And the 'Force JPG/webP thumbnails/images' be given a label above them, like 'Other image formats PNG, TIFF, HEIC etc.'

Or anything that just makes it a bit more obvious that 'Output format' does not apply to all input image formats. The documentation covers it, but it might be friendlier if the GUI was clearer.


I can look at that for v29.1 or something. Got to freeze stuff that requires another round of translation now as it's high time to get jAlbum out.
RobM

Posts: 4,380
Registered: 4-Aug-2006
Re: jAlbum on Java 18
Posted: 26 Sep 22, 22:31   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
Works here. Did you try swapping lib/bsh-2.2.0.jar with the attached one?
Replaced the file and now get error
java.lang.reflect.InaccessibleObjectException: 
Unable to make public synchronized void 
sun.awt.datatransfer.SunClipboard.setContents(java.awt.datatransfer.
Transferable,java.awt.datatransfer.ClipboardOwner) accessible: module java.desktop 
does not "exports sun.awt.datatransfer" to unnamed module @13e39c73 in 
Video GPS metadata simple.bsh at line number 230


Edited by: RobM on 26 Sep 2022, 21:33
The error has moved on to
StringSelection strSel = new StringSelection("No GPS data");
clipboard.setContents(strSel, null);
davidekholm

Posts: 4,405
Registered: 18-Oct-2002
Re: jAlbum on Java 18
Posted: 27 Sep 22, 12:51   in response to: RobM in response to: RobM
Attachment bsh-2.2.2.jar (390.4 KB)
Thanks for reporting that Rob. Well I knew my hack wasn't 100% safe and that code broke it. I've now dug deeper inside Java's module system and adjusted BeanShell so it should be working properly in all cases now. Replace bsh-2.2.1.jar with the attached bsh-2.2.2.jar
JeffTucker

Posts: 8,462
Registered: 31-Jan-2006
Re: jAlbum on Java 18
Posted: 27 Sep 22, 13:19   in response to: davidekholm in response to: davidekholm
All the more reason to "Groovy" everything. ;)
Legend
Forum admins
Helpful Answer
Correct Answer

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