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


Permlink Replies: 27 - Pages: 2 [ Previous | 1 2 ] - Last Post: 01-Apr-2020 22:35 Last Post By: davidekholm Threads: [ Previous | Next ]
ctwist

Posts: 590
Registered: 27-Sep-2003
Re: Variables needed for chaining
Posted: 25-Feb-2020 01:18   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
But the Good Lord neglected to teach our users how to create a PDF!

Edited by: ctwist on 24-Feb-2020 19:40
jGromit

Posts: 7,796
Registered: 31-Jan-2006
Re: Variables needed for chaining
Posted: 25-Feb-2020 02:15   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
In Windows, at least, that's gotten a lot easier these days. On any page, you can invoke the "print" command, but instead of steering the output to a physical printer, you can choose Microsoft Print to PDF. Really handy.
RobM

Posts: 3,197
Registered: 4-Aug-2006
Re: Variables needed for chaining
Posted: 25-Feb-2020 11:05   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
In Windows, at least, that's gotten a lot easier these days. On any page, you can invoke the "print" command, but instead of steering the output to a physical printer, you can choose Microsoft Print to PDF. Really handy.
Same on the Mac, been like that for donkeys years.
jimberry

Posts: 512
Registered: 30-Aug-2004
Re: Variables needed for chaining
Posted: 25-Feb-2020 14:59   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
And most documents you might want to convert to PDF can be either saved as PDF or Exported to PDF from the creating programs (or at least the MS Office or Libre Office versions)
davidekholm

Posts: 3,477
Registered: 18-Oct-2002
Re: Variables needed for chaining
Posted: 03-Mar-2020 12:40   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Chris, When implementing chained directories, I've obviously used different logic for producing "next" and "previous" vs "nextPage" and "previousPage". "next" and "previous are only produced for sibling folders it seems (folders having the same parent folder), while "previousPage" and "nextPage" are produced whenever possible. Don't know if this is good or bad really.

Edited by: davidekholm on 03-Mar-2020 16:36
RobM

Posts: 3,197
Registered: 4-Aug-2006
Re: Variables needed for chaining
Posted: 03-Mar-2020 15:22   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Rob, When implementing chained directories, I've obviously used different logic for producing "next" and "previous" vs "nextPage" and "previousPage". "next" and "previous are only produced for sibling folders it seems (folders having the same parent folder), while "previousPage" and "nextPage" are produced whenever possible. Don't know if this is good or bad really.
Not really sure if the above was meant for me but I have updated the variables wiki page to reflect the current situation.
jGromit

Posts: 7,796
Registered: 31-Jan-2006
Re: Variables needed for chaining
Posted: 03-Mar-2020 16:49   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
..."previousPage" and "nextPage" are produced whenever possible. Don't know if this is good or bad really.

Even with simple sibling folders, that produces an error under some circumstances. Start with Folder One, first slide, then hit Next a couple of times. The first object in Folder Two is a web location.

https://jgromit.jalbum.net/chainError/

ETA: In fact, it's not strictly a chaining problem. Start with the second folder, second slide, and hit Previous.

ETA: Actually, it is a chaining problem. If chaining is turned off, the skin property, makeWebLocationSlides=false, is correctly observed: web locations don't produce slide pages, and the "next page/previous page" logic ignores them. But if chaining is turned on, those objects become part of the navigation sequence again, even within a folder, leading to the errors in my test album.

Edited by: jGromit on 11-Mar-2020 00:25
ctwist

Posts: 590
Registered: 27-Sep-2003
Re: Variables needed for chaining
Posted: 04-Mar-2020 16:38   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
In fact, it's not strictly a chaining problem. Start with the second folder, second slide, and hit Previous.
This problem affects any skin that can open an album object outside the album. jAlbum is unaware of this, so it can't calculate the correct next or previous page, so the skin must recalculate the correct page by looping through the folder's children. This is what I do, but this technique sometimes fails when chaining. Hence this thread.
If there was an AlbumObject variable "isSlide" that the skin could set, we could dump this problem on David, but I hesitate to ask. Anyway, I doubt that the timing of this would be right; by the time the skin could do this calculation (probably during folder initialization), the AlbumObject variables would already be calculated.
ctwist

Posts: 590
Registered: 27-Sep-2003
Re: Variables needed for chaining
Posted: 26-Mar-2020 15:40   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
I see that this has been silently fixed in 19.3.6 (almost), but there is still one problem.

The good:
"previous" is now populated correctly whenever previousPage is not null. I am now able to walk backwards through a simple chained album.

The bad:
"next" is now populated whenever nextPage is not null. However, it seems to be the wrong object type.

(example removed)

Edited by: ctwist on 01-Apr-2020 13:50
davidekholm

Posts: 3,477
Registered: 18-Oct-2002
Re: Variables needed for chaining
Posted: 26-Mar-2020 16:07   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
Chris, I get confused here. "next" and "previous" should return instances of "Scope", not "AlbumObject". You should do a get("currentObject") on "next" and "previous" to get the respective AlbumObject. I put the following code inside "slide.htt" to demonstrate:
<ja:if exists="previous">
previous: <%= previous.get("currentObject").getClass() %>
</ja:if>
<ja:if exists="next">
<br>next: <%= next.get("currentObject").getClass() %>
</ja:if>

This now prints "AlbumObject" if "next" or "previous" is not null, just like I expected. What's different with your skin?
ctwist

Posts: 590
Registered: 27-Sep-2003
Re: Variables needed for chaining
Posted: 26-Mar-2020 16:17   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Yes, of course. My analysis was flawed.

I need to do some more investigation.
ctwist

Posts: 590
Registered: 27-Sep-2003
Re: Variables needed for chaining
Posted: 01-Apr-2020 19:56   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
My problem was caused by a bug in the skin (surprise, surprise!). When chaining descended into a subfolder, the skin was looking for a skin object that hadn't been created yet.

This is now working correctly.
davidekholm

Posts: 3,477
Registered: 18-Oct-2002
Re: Variables needed for chaining
Posted: 01-Apr-2020 22:35   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
Great!
Legend
Forum admins
Helpful Answer
Correct Answer

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