This question is answered.


Permlink Replies: 2 - Pages: 1 - Last Post: 25 Mar 22, 13:19 Last Post By: JeffTucker
JeffTucker

Posts: 8,212
Registered: 31-Jan-2006
Setting folder thumb processing from skin UI
Posted: 25 Mar 22, 12:50
 
  Click to reply to this thread Reply
In Atom, if the user selects Separate folder section, I use the folder thumbs. Otherwise, the folder thumbnails are treated like regular thumbnails. I'm currently making the switch in init.bsh, but I'd rather be doing it from the skin's UI. I've tried the obvious approach:
new StateMonitor() {
	public void onChange() {
		engine.setProcessFolderThumbs(folderSection.isSelected());
		window.engine2UI();
	}
}.add(folderSection).done();
This doesn't crash or produce any error message, but it doesn't work, either, and it freezes the checkbox in the skin's UI.

Is there some other way of pulling this off?
davidekholm

Posts: 3,473
Registered: 18-Oct-2002
Re: Setting folder thumb processing from skin UI
Posted: 25 Mar 22, 13:08   in response to: JeffTucker in response to: JeffTucker
Correct
  Click to reply to this thread Reply
Your onChange callback needs to look like this:
window.ui2Engine();
engine.setProcessFolderThumbs(folderSection.isSelected());
window.engine2UI();
That's because the just-occurred selection of the folderSection checkbox will be reverted by the engine2UI() call if it hasn't been preceded by a ui2Engine call that copies the new checked state of that checkbox to the "model" (i.e. "engine")
JeffTucker

Posts: 8,212
Registered: 31-Jan-2006
Re: Setting folder thumb processing from skin UI
Posted: 25 Mar 22, 13:17   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Oh, that works "real good." Does exactly what I want. :)

ETA: Take the weekend off.
Legend
Forum admins
Helpful Answer
Correct Answer

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