Skip to main content
Participant
March 1, 2009
Question

LrBinding and key comparison

  • March 1, 2009
  • 2 replies
  • 691 views
I'm completely new to lua and I have a plugin I need to write, I was hoping for some good websites with excellent documentation. I've been looking through the sample plugins and the api docs that came with the sdk and I've been doing ok, however, I'd like to expand a bit.

Preface: I'm horrible at conveying my thoughts, most of the time. I feel this is one of those moments. Proceed with caution.

I'm currently trying to have a nested conditional view that if I choose the first item in a popup_menu a row will appear and if I choose the second, a completely different row appears. Each of the new rows contain another popup_menu that have a couple selections and I need a certain row to appear based on the selected values of first and second rows.

As I write this, I'm thinking I can create an observer, but I feel it's not the best way to do it. The first dropdown only has 2 options, the second can potentially have many and it just needs an item selected. What needs to be displayed once that second dropdown has a value is either a bunch of editable fields or static texts, dependent on the initial dropdown.

Thanks! Hope I didn't blow your mind.
This topic has been closed for replies.

2 replies

Participant
March 3, 2009
Rows cannot be made invisible but views can so instead of a row you can do LrView.view { place = "horizontal" }. Note that views will clip their childrens drawing so you may need a margin to avoid that.

As to the popups, you might try binding the popup value to a unique key in the property table. Then bind the visibility of the views to that value in the property table.
Participating Frequently
March 2, 2009
I don't think you can have an invisible row! I have set the value to false and the row is still visible. You can create invisible controls in the row instead.