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



Permlink Replies: 124 - Pages: 9 [ Previous | 1 2 3 4 5 6 7 | Next ] - Last Post: 29 Oct 25, 19:50 Last Post By: davidekholm Threads: [ Previous | Next ]
JeffTucker

Posts: 8,065
Registered: 31-Jan-2006
Re: jAlbum 38 release candidate for testing
Posted: 16 Oct 25, 23:03   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
Now v38rc6 is available.

I see that the Structures panel is still present. You're a very brave person. Or something.
RobM

Posts: 3,949
Registered: 4-Aug-2006
Re: jAlbum 38 release candidate for testing
Posted: 16 Oct 25, 23:12   in response to: JeffTucker in response to: JeffTucker
Attachment Views in Stocks.png (176.2 KB)
JeffTucker wrote:
Stranger and stranger. In the project panel, I'm not seeing the folder for the "recently added" view, so I can't select it to begin with. Screenshot.
See attached for what I'm doing and seeing.
JeffTucker

Posts: 8,065
Registered: 31-Jan-2006
Re: jAlbum 38 release candidate for testing
Posted: 16 Oct 25, 23:40   in response to: RobM in response to: RobM
I can't quite sort it out, but I think that, as a first step, I would stop using the "Stocks" demo project. The views in that one were manually created by doing some internal fiddling. The model has changed by now. I'd start with a simple test project with a dozen images, then create a view, etc., etc.
RobM

Posts: 3,949
Registered: 4-Aug-2006
Re: jAlbum 38 release candidate for testing
Posted: 17 Oct 25, 00:15   in response to: JeffTucker in response to: JeffTucker
JeffTucker wrote:
I can't quite sort it out, but I think that, as a first step, I would stop using the "Stocks" demo project. The views in that one were manually created by doing some internal fiddling. The model has changed by now. I'd start with a simple test project with a dozen images, then create a view, etc., etc.
Good idea. Tomorrow...
RobM

Posts: 3,949
Registered: 4-Aug-2006
Re: jAlbum 38 release candidate for testing
Posted: 17 Oct 25, 20:45   in response to: RobM in response to: RobM
RobM wrote:
JeffTucker wrote:
I can't quite sort it out, but I think that, as a first step, I would stop using the "Stocks" demo project. The views in that one were manually created by doing some internal fiddling. The model has changed by now. I'd start with a simple test project with a dozen images, then create a view, etc., etc.
Good idea. Tomorrow...
Well, that din't make a difference as I'm still getting a window with just a grey background. Maybe another Tahoe 'special' feature :(

I duplicated the 'Welcome to jAlbum' project, added a folder and inside that folder added one view of each type. With all those views visible in explore mode I used the Tools menu to enter review mode. If I enter review mode outside that views containing folder review mode works as expected, the views folder does not appear.
JeffTucker

Posts: 8,065
Registered: 31-Jan-2006
Re: jAlbum 38 release candidate for testing
Posted: 17 Oct 25, 21:29   in response to: RobM in response to: RobM
Ah, yes. I can get there.

To sum it up, if you create a folder that has only one or more views in it, and no other content, and you enter that folder, the Review mode sends you into the trackless gray wilderness. Happily, you can ESC out of it, even though there are no visible controls.

If there's anything else in there, like a single JPG, Review mode shows you that JPG, with no "previous" or "next," as it should.
davidekholm

Posts: 3,825
Registered: 18-Oct-2002
Re: jAlbum 38 release candidate for testing
Posted: 17 Oct 25, 23:45   in response to: RobM in response to: RobM
RobM wrote:
If I have a recently added view and a by date view, the recently added view is shown in the web page for the by date view. Logically this seems right, but somehow I feel it should not be shown. Maybe all views should be mutually exclusive, their results only appearing in the view itself?

Yes, I will address this. Views are intended to only traverse real folders, but that's currently not the case.
davidekholm

Posts: 3,825
Registered: 18-Oct-2002
Re: jAlbum 38 release candidate for testing
Posted: 17 Oct 25, 23:49   in response to: RobM in response to: RobM
RobM wrote:
JeffTucker wrote:
Stranger and stranger. In the project panel, I'm not seeing the folder for the "recently added" view, so I can't select it to begin with. Screenshot.
See attached for what I'm doing and seeing.

You've probably created those views in the "Views" folder, which only contains views. As views shouldn't traverse other views, you get blank results. Views are sensitive to the current folder they were created in, so if you want them to traverse the root, create them in the root, then move them to where you want them.
davidekholm

Posts: 3,825
Registered: 18-Oct-2002
Re: jAlbum 38 release candidate for testing
Posted: 17 Oct 25, 23:54   in response to: davidekholm in response to: davidekholm
Views shouldn't traverse into other views, but currently, some will. This is a side effect of transforming the views to (almost) ordinary folders, one by one. Later transformed views will now traverse previously transformed views. I'll fix this tomorrow.

I've also made a bunch of linking adjustments and other bug fixes. The daring can try the latest beta core update, which also includes a custom filter view, where you can script any expression for what to include in that view. (still in development)
RobM

Posts: 3,949
Registered: 4-Aug-2006
Re: jAlbum 38 release candidate for testing
Posted: 18 Oct 25, 00:21   in response to: davidekholm in response to: davidekholm
Quick test using obj.isIncluded() and obj.isFolder()
The first finds all objects that aren't folders, the second finds nothing. But no smoke and flames! ;)
davidekholm

Posts: 3,825
Registered: 18-Oct-2002
Re: jAlbum 38 release candidate for testing
Posted: 18 Oct 25, 00:45   in response to: RobM in response to: RobM
RobM wrote:
Quick test using obj.isIncluded() and obj.isFolder()
The first finds all objects that aren't folders, the second finds nothing. But no smoke and flames! ;)

Nice huh? Folders are always excluded from views, and so are excluded and hidden objects as well.
davidekholm

Posts: 3,825
Registered: 18-Oct-2002
Re: jAlbum 38 release candidate for testing
Posted: 18 Oct 25, 00:57   in response to: davidekholm in response to: davidekholm
rc9 now available as a beta update. This version fixes the duplicates that appeared within views.

Geek warning below:
With this version, I've also updated the power of jAlbum's iterator API. As you may know there is a AlbumObject.getDescendants() method call that saves you from needing recursive calls like this if you wish to iterate a folder tree:

Old sample code (flatten transformer):

    public AlbumObject transform(AlbumObject tree, VirtualFolder newRoot) {
        List<AlbumObject> children = tree.getChildren();
        if (children != null) {
            for (AlbumObject ao : children) {
                if (!ao.isView()) {
                    if (ao.isFolder()) {
                        if (!ao.isHidden() && ao.isIncluded()) {
                            transform(ao, newRoot);
                        }
                    } else {
                        newRoot.addFileOf(ao);
                    }
                }
            }
        }
        return newRoot;
    }
Note the checks for !isView() in order to avoid traversing into sub folders.
BUT, recursive code is always a bit challenging to write. The very least, you have to introduce a method call. That's why I added the getDescendants() call. An optimistic rewrite of the code above using getDescendants() would look like this:
        tree.getDescendants()
                .stream()
                .filter(ao -> !ao.isView())
                .filter(ao -> !ao.isFolder())
                .forEach(ao -> newRoot.addFileOf(ao));
        return newRoot;

Much more readable, and shorter, but I introduced a bug now: The filter is applied to each and every AlbumObject of the tree, so when I filter out a View or a Folder, their children will still be included. I needed a way to apply filters BEFORE sub folder iteration, and now you can do that, like this:
        tree.getDescendants()
                .filter(ao -> !ao.isView())
                .stream()
                .filter(ao -> !ao.isFolder())
                .forEach(ao -> newRoot.addFileOf(ao));
        return newRoot;
davidekholm

Posts: 3,825
Registered: 18-Oct-2002
Re: jAlbum 38 release candidate for testing
Posted: 18 Oct 25, 01:02   in response to: davidekholm in response to: davidekholm
Another geek note: After the stream() call, you're processing a Java Stream. It's a very powerful API. Just add parallelStream() to the call chain and the remaining stream will be processed in parallel, i.e. by multiple CPU cores.
JeffTucker

Posts: 8,065
Registered: 31-Jan-2006
Re: jAlbum 38 release candidate for testing
Posted: 18 Oct 25, 02:18   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
This version fixes the duplicates that appeared within views.

Not in my test. Create a project with a few JPG's. Now create a folder, and put some internally-linked objects into it. Now create a view, like alphabetical. The view contains duplicates of objects that are in the root, and internally-linked objects from the folder of links.
davidekholm

Posts: 3,825
Registered: 18-Oct-2002
Re: jAlbum 38 release candidate for testing
Posted: 18 Oct 25, 11:22   in response to: JeffTucker in response to: JeffTucker
JeffTucker wrote:
davidekholm wrote:
This version fixes the duplicates that appeared within views.

Not in my test. Create a project with a few JPG's. Now create a folder, and put some internally-linked objects into it. Now create a view, like alphabetical. The view contains duplicates of objects that are in the root, and internally-linked objects from the folder of links.


I currently ignore duplicates due to views, but not due to internally linked objects. I'll look into ignoring internal links while building views
Legend
Forum admins
Helpful Answer
Correct Answer

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