Adobe 65007312 - Photoshop Lightroom Programmer's Manual page 176

Mac
Hide thumbs Also See for 65007312 - Photoshop Lightroom:
Table of Contents

Advertisement

C
9: Getting Started: A Tutorial Example
HAPTER
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",
end )
3. In this context, create two observable tables:
4. Create a data key for each of the sliders, one in each table, with an initial numeric value:
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 {
-- body of called function
-- body of called function
local tableOne = LrBinding.makePropertyTable( context )
local tableTwo = LrBinding.makePropertyTable( context )
tableOne.sliderOne = 0
tableTwo.sliderTwo = 50
f:group_box {
title = "Slider One",
font = "<system>",
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 = "<system>",
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,
function( context )
Binding to multiple keys 176

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop lightroom sdk 3.0

Table of Contents