Adobe 65007312 Programming Guide - Page 176
Create a data key for each of the sliders, one in each table, with an initial numeric value
UPC - 883919154398
View all Adobe 65007312 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 176 highlights
CHAPTER 9: Getting Started: A Tutorial Example Binding to multiple keys 176 2. In the body of this function, add code to create the function-context call you need for the property table: -- body of show-dialog function LrFunctionContext.callWithContext( "showCustomDialogWithMultipleBind", function( context ) -- body of called function end ) 3. In this context, create two observable tables: -- body of called function local tableOne = LrBinding.makePropertyTable( context ) local tableTwo = LrBinding.makePropertyTable( context ) 4. Create a data key for each of the sliders, one in each table, with an initial numeric value: tableOne.sliderOne = 0 tableTwo.sliderTwo = 50 5. At the top level, create the view hierarchy for the dialog. In this one, the root node is a column container with one row, and the controls in the row are grouped together using a group box container: local f = LrView.osFactory() -- obtain the view factory object local c = f:column { bind_to_object = tableOne, -- bind tableOne spacing = f:control_spacing(), f:row { f:group_box { title = "Slider One", font = "", f:slider { value = LrView.bind( "sliderOne" ), min = 0, max = 100, width = LrView.share( "slider_width" ) }, f:edit_field { place_horizontal = 0.5, value = LrView.bind( "sliderOne" ), width_in_digits = 7 }, }, f:group_box { title = "Slider Two", font = "", f:slider { bind_to_object = tableTwo, value = LrView.bind( "sliderTwo" ), min = 0, max = 100, width = LrView.share( "slider_width" ) }, f:edit_field { place_horizontal = 0.5, bind_to_object = tableTwo,