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


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


Permlink Replies: 14 - Pages: 1 - Last Post: 3 Nov 23, 20:44 Last Post By: JeffTucker Threads: [ Previous | Next ]
JeffTucker

Posts: 8,048
Registered: 31-Jan-2006
Problems with the About page
Posted: 31 Oct 23, 14:17
 
If I add About.htt to a test album, and the first thing I try to do is select an Author image for it by clicking the Select button, I'm dead in the water. The Author image box briefly shows the file name, but then goes blank. At that point, I can't use Select again, and the other fields on the page won't accept any typed input.

If I close About.htt, then open it for editing again, I can now enter things normally, including an Author image.

It also works properly if, when first editing About.htt, I enter the text first, then select an Author image.

However, in the finished album, the Header never appears anywhere on the *About" page.

One other annoyance: when I click the Select button, the file chooser starts at This PC, showing the hard drives, etc,, instead of starting in the Pictures folder. Internally, it needs something like:
if (java.lang.System.getProperty("my.pictures.path") != null) {
            customImageChooser.setCurrentDirectory(new File(java.lang.System.getProperty("my.pictures.path")));
        }
It also doesn't remember the last location, though I've run into that problem in other choosers.
mrag

Posts: 263
Registered: 26-Jul-2003
Re: Problems with the About page
Posted: 31 Oct 23, 14:49   in response to: JeffTucker in response to: JeffTucker
 
I can confirm all of Jeff's issues with the About page. I don't have much of a concern about where the Author's Image starts (when it does get started) as I was trying to use an avatar that I personally store in My Documents, not in Pictures. I guess the situation might be similar to where does everyone generally store their favicons?

I did have a problem choosing some avatars (jpg) and I was not able to track down a reason why. Whatever you choose, try some different images.

I also had some concerns about the other pages but I'll address those in separate posts.

(As a side note, I like Plain and these htt pages are a nice addition. Just a little messy at this point for jAlbum's default skin)
Laza

Posts: 1,411
Registered: 6-Sep-2005
Re: Problems with the About page
Posted: 1 Nov 23, 06:59   in response to: JeffTucker in response to: JeffTucker
 
The FileChooser the About page is using might be deprecated. It's an old piece of code and affects all my skins. For me, on a Win11 PC it works, but minimizes jAlbum upon the file selection. What do you suggest?
davidekholm

Posts: 3,823
Registered: 18-Oct-2002
Re: Problems with the About page
Posted: 1 Nov 23, 09:33   in response to: Laza in response to: Laza
 
I suggest using my abstraction JFileSelector instead.
davidekholm

Posts: 3,823
Registered: 18-Oct-2002
Re: Problems with the About page
Posted: 1 Nov 23, 09:40   in response to: davidekholm in response to: davidekholm
 
I can't reproduce. I'm on OS X Monterey. I've tried with both Java 19 and Java 14
JeffTucker

Posts: 8,048
Registered: 31-Jan-2006
Re: Problems with the About page
Posted: 1 Nov 23, 13:28   in response to: Laza in response to: Laza
 
Attachment plainAbout.png (27.2 KB)
Attachment jAlbumAdd.png (88.9 KB)
Attachment NeptuneLogo.png (89.3 KB)
Laza wrote:
The FileChooser the About page is using might be deprecated. It's an old piece of code and affects all my skins. For me, on a Win11 PC it works, but minimizes jAlbum upon the file selection.

Not sure what you mean by that, but I'm not seeing any minimizing on Win11.

And none of that alters what happens in a Plain project if I add About.htt, open it for editing, and hit Select. The first attempt to use it fails. Close and reopen, and it's OK. Same on Win11 and macOS Big Sur.

What do you suggest?

Not sure - David is probably a better guide. But here are three screenshots, showing what happens when I want to select an "author image" from Plain's About.htt, what happens when I want to add an image in the jAlbum core, and what happens when I go to the Title Bar tab in Neptune, and click Add to choose a logo image.

If you want to see what I'm doing, load Neptune, open the skin directory, open the sources folder, open Neptune.java, and search for customImageChooser.
JeffTucker

Posts: 8,048
Registered: 31-Jan-2006
Re: Problems with the About page
Posted: 1 Nov 23, 13:30   in response to: davidekholm in response to: davidekholm
 
davidekholm wrote:
I can't reproduce. I'm on OS X Monterey. I've tried with both Java 19 and Java 14

What can you not reproduce? The freezing behavior is the same in Win11 and macOS.

The suboptimal file chooser opening location seems to be a Windows thing. The vast majority of your users are on Win10 or Win11, so testing with an obsolete version of macOS is probably not something you should rely on.
JeffTucker

Posts: 8,048
Registered: 31-Jan-2006
Re: Problems with the About page
Posted: 2 Nov 23, 14:03   in response to: JeffTucker in response to: JeffTucker
 
Same problems in Plain 2.1.1.

(The Plain skin page is stuck on 2.0.2, BTW.)

ETA: The entered Header is now appearing on the page. The problem that remains is that it takes at least two tries to get an Author image to work. And the file chooser is still opening at the "my PC" level, which is never where you want to be. Either Pictures or, at worst, whatever "home" is defined as.
Laza

Posts: 1,411
Registered: 6-Sep-2005
Re: Problems with the About page
Posted: 2 Nov 23, 16:37   in response to: JeffTucker in response to: JeffTucker
 
The image selector hasn't been modified, but I fixed the header.

I asked David to try if image selection works for him, but he said it works fine. For me, the selector selects the image and saves it to the res folder and the file name appears for a fraction of a second, but vanishes immediately.

If I add any text to the fields below, it fills in the authorImage field.

If I remove the About page and add it again, the selector works fine.

I believe it's not the skin's fault.

The only suspicious info on the System console was (for the first attempt only):
Camera date cache miss for About.htt
JeffTucker

Posts: 8,048
Registered: 31-Jan-2006
Re: Problems with the About page
Posted: 2 Nov 23, 18:01   in response to: Laza in response to: Laza
 
Here's the sequence. Follow it step-by-step, and don't second-guess anything.

  • Start a new project with Plain and add a few images.
  • Add the About.htt page, and double-click it to open it for editing.
  • Click Select to add an author image, and navigate to a JPG somewhere. The file name appears briefly, then vanishes.
  • Now try to enter Header or Text. On my machine, I can't. The Header and Text fields are non-responsive.
  • Close About.htt and reopen it. Now, things are back to normal, and I can select an image and enter text.

I'm not seeing any console messages about any of this.

Is this the fault of the skin, or the core? Frankly, I don't care. I've never encountered it before, in any of the file selectors in my skins.

And tell David to stop testing on macOS. The vast majority of his users are on Win10/Win11. ;)
mrag

Posts: 263
Registered: 26-Jul-2003
Re: Problems with the About page
Posted: 2 Nov 23, 20:55   in response to: JeffTucker in response to: JeffTucker
 
Following Jeff's instructions, this is exactly how it plays out on my Win10. The problem hasn't changed since the first version. I'm now on the latest jAlbum 33.1


Minor points, but mostly related to the htt files. The wording on Sitemap.htt and on Contents.htt is wrong. For example, does one really need to "Put it in the root of your album" anymore?

And audio clips will soon be activated?
ronvanrossum

Posts: 66
Registered: 16-Jul-2014
Re: Problems with the About page
Posted: 3 Nov 23, 08:46   in response to: JeffTucker in response to: JeffTucker
 
This is exactly how it works for me. After selecting a photo, its name disappears from the input field. However, the photo is copied to the res folder. I can enter text in the header and text boxes, but I have to do it very quickly. Within a fraction of a second, the entered text disappears. When I click on a text box, a blue frame appears around this text box, which quickly disappears. While there is a blue frame around the input field, I can type.

The thing is, this doesn't just happen with the Plain skin, but also with Tiger, Story and probably all Laza's skins.

iMac
macOS Ventura 13.6.1
jAlbum 33.1

Edited by: ronvanrossum on 3 Nov 2023, 10:24 - Addition:

There is nothing wrong with the skin. It all depends on the existance of the res folder. If the res folder doesn't exist, there is an issue. If the res folder already exists, there is no issue.
Laza

Posts: 1,411
Registered: 6-Sep-2005
Re: Problems with the About page
Posted: 3 Nov 23, 13:09   in response to: JeffTucker in response to: JeffTucker
 
Thanks to all of you, finally we (I mean David) could fix this bug. It's been there for years, with all of my skins (and possibly others). The culprit is the res folder creation, which tricks jAlbum into scanning that folder and entering an endless loop. This code should take care of it:
				AlbumObject resFolder = rootFolder.getChild("res");
				if (resFolder ==  null) {
					resFolder = rootFolder.createFolder("res");
				}
				File dst = resFolder.getFile();

I'll release the skin soon with the fixed NewImages.htt.
JeffTucker

Posts: 8,048
Registered: 31-Jan-2006
Re: Problems with the About page
Posted: 3 Nov 23, 14:28   in response to: Laza in response to: Laza
 
I should have spotted that. There used to be a situation like that with the output res folder, in which the skin is trying to plant something there before it exists. I still have some "make res" code in my skins, just to be safe.

On the image directory side, I don't use a res folder. I stash those user-selected extra images (and other things, like WOFF files) in, e.g., .jalbum/.neptune, and use DiskCache to keep it clean (so I don't end up with a bunch of old, no-longer needed files there). The other advantage of that is that it's invisible to the user. He never sees a mysterious res folder in the Explore view, which he might be tempted to delete.
JeffTucker

Posts: 8,048
Registered: 31-Jan-2006
Re: Problems with the About page
Posted: 3 Nov 23, 20:44   in response to: JeffTucker in response to: JeffTucker
 
The problems with the About page have been fixed. The file chooser still opens to a suboptimal location (the "my PC" level), but otherwise, things are behaving. :)
Legend
Forum admins
Helpful Answer
Correct Answer

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