This question is answered.


Permlink Replies: 8 - Pages: 1 - Last Post: 16-Jan-2020 19:04 Last Post By: davidekholm Threads: [ Previous | Next ]
ctwist

Posts: 568
Registered: 27-Sep-2003
"Making album" window
Posted: 14-Jan-2020 04:52
 
  Click to reply to this thread Reply
During album generation, a "Making album" window shows the progress.

Is a skin able to add messages to this window? Mirage does some work during album initialization and index initialization, and this sometimes lasts long enough that the user may think that album generation is stuck.
RobM

Posts: 3,190
Registered: 4-Aug-2006
Re: "Making album" window
Posted: 14-Jan-2020 11:02   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
Maybe the monitored work queue would do?
https://jalbum.net/forum/thread.jspa?messageID=329878
And code snippet, MonitoredWorkQueue, long tasks by David Ekholm, http://jalbum.net/help/en/Code_Snippets
davidekholm

Posts: 3,652
Registered: 18-Oct-2002
Re: "Making album" window
Posted: 14-Jan-2020 11:57   in response to: ctwist in response to: ctwist
Correct
  Click to reply to this thread Reply
There is no public API for this currently. If you use BeanShell or reflection, then you can call AlbumBean.fireImageProcessingStarted and pass a AlbumBeanEvent object describing what you're up to (passing the message in the "msg" parameter. Using BeanShell, you call setAccessibility(true) first in order to access fireImageProcessingStarted, which is a protected method)
ctwist

Posts: 568
Registered: 27-Sep-2003
Re: "Making album" window
Posted: 14-Jan-2020 19:58   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
RobM wrote:
Maybe the monitored work queue would do?
I tried this. It creates a message in a separate progress window, so it doesn't do what I want.

davidekholm wrote:
There is no public API for this currently. If you use BeanShell or reflection, then you can call AlbumBean.fireImageProcessingStarted and pass a AlbumBeanEvent object describing what you're up to (passing the message in the "msg" parameter.

I added reflection and tried this and it worked, first time! I'm in shock!

I just need to make some improvements to the messages now.
jGromit

Posts: 7,714
Registered: 31-Jan-2006
Re: "Making album" window
Posted: 14-Jan-2020 20:51   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
ctwist wrote:
...it worked, first time! I'm in shock!

When this happens to me, I take the rest of the week off. No sense tempting fate. ;)
ctwist

Posts: 568
Registered: 27-Sep-2003
Re: "Making album" window
Posted: 16-Jan-2020 17:51   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
I have added this to Code Snippets.
davidekholm

Posts: 3,652
Registered: 18-Oct-2002
Re: "Making album" window
Posted: 16-Jan-2020 18:15   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
ctwist wrote:
...it worked, first time! I'm in shock!

When this happens to me, I take the rest of the week off. No sense tempting fate. ;)


:-D
RobM

Posts: 3,190
Registered: 4-Aug-2006
Re: "Making album" window
Posted: 16-Jan-2020 18:48   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
ctwist wrote:
I have added this to Code Snippets.
Thanks, I was very curious about how the code would look, and I’m sure it is going to get incorporated in other skins sooner or later.
davidekholm

Posts: 3,652
Registered: 18-Oct-2002
Re: "Making album" window
Posted: 16-Jan-2020 19:04   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I should probably make those fire* methods public. That would expose the AlbumBeanEvent, but it's already exposed. With these methods public, you can call them without reflection, but would require v19.3
Legend
Forum admins
Helpful Answer
Correct Answer

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