Lightroom Forums

Please login or register.

Login with username, password and session length
Advanced search  

Header

Pages: [1]   Go Down

Author Topic: Webengine Slider Control question - How to use numImages in galleryInfo?  (Read 326 times)

larrycook99

  • New Member
  • *
  • Posts: 8
  • Location: Lexington, KY, USA
  • Primary OS: Windows
  • OS Version: XP
  • Memory: 2 GB
  • CPU Cores: 1
  • Video Brand: nVidia
  • LR Version: 2.6
  • Printer: Lexmark
  • Camera: Pentax
    • WWW
In writing a webengine for LR 2.6 I want a slider control that allows me to select the index for a single image in the gallery. I though that I could create the control using code in the galleryInfo.lrweb file like this:

f:slider_row {
         bindingValue = "nonCSS.mainImageIndex",
         title = "Main Page Image Index",
         property = "nonCSS.mainImageIndex",
         tracking = "nonCSS.mainImageIndex.tracking",
         tracking_value = "slider_tracking_now",
         propMax = numImages,
         propMin = 1,
         width_in_digits = 4,
         precision = 0,
      },

but it does not work. It seems that "numImages" is not known here. Why not? If I replace "numImages" with a number all is well except that I cannot get what I want. Is what I want to do not possible or am I just missing something? This has me stumped at the moment.

Update to post: Actually the real question is how to make the environmental variable "numImages" visible? There are several "Environment Variables" listed in Chapter 4 of the 2.0 SDK including "numImages", "LOC", "string", "math" and others. In looking thru the basic HTML engine that comes with LR I see LOC, string and math all used in galleryInfo.lrweb. So I assumed that "numImages" could be also. Unfortunately so far I have been unable to do so and cannot figure out why.
« Last Edit: July 27, 2010, 07:58:01 AM by larrycook99 »
Logged

Brad Snyder

  • Moderator
  • Senior Member
  • *
  • *
  • Posts: 5013
  • Location: Port Deposit, Maryland USA
  • Primary OS: Windows
  • OS Version: 7
  • Memory: > 4 GB
  • CPU Cores: 4
  • Video Brand: ATI
  • Printer: HP
  • Camera: Canon
Larry, welcome to the forums.

This is pretty esoteric for our regulars. I'm hopeful that one of our 3rd party Web gurus will stop by with some advice, but may not be immediately.

I see you've asked the same question at the official SDK forum, that may be your best bet.

larrycook99

  • New Member
  • *
  • Posts: 8
  • Location: Lexington, KY, USA
  • Primary OS: Windows
  • OS Version: XP
  • Memory: 2 GB
  • CPU Cores: 1
  • Video Brand: nVidia
  • LR Version: 2.6
  • Printer: Lexmark
  • Camera: Pentax
    • WWW
Brad, you got me all excited. I saw that someone replied and I had hoped with at least a hint of an answer.  The good news is that at least it is being read and hopefully someone will eventually know the answer, hopefully sooner rather than later. This is one of those problems that I want to fix and move on.

This seems conceptually so simple to me on the surface, because what I am trying to do is this: Create a LR webengine that has a main page, created using AddPage, with an image that links to a basic grid gallery, created using AddGridPages. On the main page I want to be able to display one of the images from the collection that populates the gallery. That is why I need to know how many images there are in that gallery when I set up the slider control. I could just put in a large max number but if the index is greater than the number of images in the collection LR does not die gracefully. I can currently do everything I want except bound the upper limit of the slider control....AARRRGGGGHHH!!!!!
Logged

Brad Snyder

  • Moderator
  • Senior Member
  • *
  • *
  • Posts: 5013
  • Location: Port Deposit, Maryland USA
  • Primary OS: Windows
  • OS Version: 7
  • Memory: > 4 GB
  • CPU Cores: 4
  • Video Brand: ATI
  • Printer: HP
  • Camera: Canon
I think that Sean McCormack battled a similar issue with his LRB Portfolio. Don't know if it had anything to do with numImages, but for a while he used the same tactic of declaring a maximum number. At some point he figured something out.

He stops by here regularly, or you might try pinging him on his lightroom-blog.com

larrycook99

  • New Member
  • *
  • Posts: 8
  • Location: Lexington, KY, USA
  • Primary OS: Windows
  • OS Version: XP
  • Memory: 2 GB
  • CPU Cores: 1
  • Video Brand: nVidia
  • LR Version: 2.6
  • Printer: Lexmark
  • Camera: Pentax
    • WWW
For those interested in an answer to this question, I sent an email to Sean as Brad suggested and his reply was that "AFAIK you can't make variable calls inside UI elements. It's ... the same for cellIndex, etc. Anything I've tried similarly doesn't work."

If anyone has an idea as to how to achieve this thru different means I would be most interested.
« Last Edit: July 29, 2010, 08:42:41 AM by larrycook99 »
Logged
Pages: [1]   Go Up
« previous next »
 

© 2007-2010 Lightroom Forums. All rights reserved.

Adobe, Adobe Photoshop, and Adobe Photoshop Lightroom (and derivatives) are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. Lightroom Forums is an independent Website not endorsed or sponsored by Adobe Systems Incorporated.

Certain content presented on this Website is copyrighted material from outside sources, and may not be reproduced, in whole or in part, without permission of the original copyright holder.

This Website is hosted by BlueHost.

Page created in 0.409 seconds with 21 queries.