|
Replies:
8
-
Pages:
1
-
Last Post:
25 Nov 18, 17:30
Last Post By: JeffTucker
|
|
|
Posts:
8,039
Registered:
31-Jan-2006
|
|
|
Current, next, and previous within fileiterator
Posted:
24 Nov 18, 07:47
|
|
|
Having a "brain freeze" moment. In theory, the current, next, and previous variables should be accessible from within a fileiterator. But next and previous seem to be void or null at all times - only current is defined. I'm not talking about something in slide.htt - this is within a fileiterator in index.htt. For example, these lines in index.htt always come back null: <ja:fileiterator>
<%System.out.println(currentObject.getVars().get("next"));%>
</ja:fileiterator>
And this blows up because next is always void: <ja:fileiterator>
<%System.out.println(next);%>
</ja:fileiterator>
What am I doing wrong?
|
|
|
Posts:
3,815
Registered:
4-Aug-2006
|
|
|
Re: Current, next, and previous within fileiterator
Posted:
24 Nov 18, 11:43
in response to: JeffTucker
|
|
|
Haven’t tried it, not fired up the Mac yet, but what about the ja:enter tag?
|
|
|
Posts:
8,039
Registered:
31-Jan-2006
|
|
|
Re: Current, next, and previous within fileiterator
Posted:
24 Nov 18, 13:35
in response to: RobM
|
|
|
Haven’t tried it, not fired up the Mac yet, but what about the ja:enter tag?
No, this isn't about folder variables.
I could do this manually, of course - create an array based on currentObject.getChildren() before entering the iterator, and then index into it while iterating. But there seems to be something wrong with the defined variables.
|
|
|
Posts:
3,815
Registered:
4-Aug-2006
|
|
|
Re: Current, next, and previous within fileiterator
Posted:
24 Nov 18, 15:00
in response to: JeffTucker
|
|
|
No, this isn't about folder variables.
But there seems to be something wrong with the defined variables.
I think it is just that previous/next are not defined, despite the manual saying so
|
|
|
Posts:
8,039
Registered:
31-Jan-2006
|
|
|
Re: Current, next, and previous within fileiterator
Posted:
24 Nov 18, 15:25
in response to: RobM
|
|
|
I think it is just that previous/next are not defined, despite the manual saying so
That's what my tests are telling me. Oddly, however, current is defined.
ETA: Happily, I don't really need it after all - there's an easier way to do what I'm trying to do. So, if it's just a matter of updating the manual, that would be good enough for now. I don't think anyone has ever tried to use those variables in a fileiterator before. They work OK in slide.htt, which is where you're more likely to need them.
|
|
|
Posts:
3,815
Registered:
4-Aug-2006
|
|
|
Re: Current, next, and previous within fileiterator
Posted:
24 Nov 18, 16:35
in response to: JeffTucker
|
|
|
So, if it's just a matter of updating the manual, that would be good enough for now. I don't think anyone has ever tried to use those variables in a fileiterator before. They work OK in slide.htt, which is where you're more likely to need them.
Manual updated. Last time this came up appears to have been with the release of jAlbum 9.4 in 2011.
|
|
|
Posts:
8,039
Registered:
31-Jan-2006
|
|
|
Re: Current, next, and previous within fileiterator
Posted:
24 Nov 18, 16:39
in response to: RobM
|
|
|
I'll be curious to see what David has to say about it.
The only references I could find to these variables all involved using them within slide.htt. I use it in a couple of skins to preload slide images - makes loading of the next page, like mydog.html, a lot quicker, since mydog.jpg is already in cache before you get to the page.
|
|
|
Posts:
8,039
Registered:
31-Jan-2006
|
|
|
Re: Current, next, and previous within fileiterator
Posted:
25 Nov 18, 17:30
in response to: davidekholm
|
|
|
Yeah, first time it's come up in a decade, and it turns out I don't actually need it, anyway.
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|