Skip to main content
Adobe Photoshop Family



5.3K Messages


95.6K Points

Mon, Jul 25, 2011 10:48 PM

SDK Gratuitous difference in static_text between Mac and Windows

There’s a minor gratuitous difference between LR 3.2 on Windows and Mac in how the view:static_text control formats integers assigned the “title” property. For example, given:

f:static_text {title = 32}

Windows LR displays that as “32”, whereas Mac LR displays it as “32.00”. This also happens if the title property is getting its value indirectly via a property table.

Test program illustrating the bug:

local LrBinding = import 'LrBinding'
local LrDialogs = import 'LrDialogs'
local LrFunctionContext = import 'LrFunctionContext'
local LrView = import 'LrView'
local f = LrView.osFactory()

LrFunctionContext.callWithContext ("test", function (context)
local prop = LrBinding.makePropertyTable (context)
prop.title1 = 32
prop.title2 = tostring (32)
LrDialogs.presentModalDialog {title = "Test", contents = f:column {
bind_to_object = prop,
f:static_text {title = 32},
f:static_text {title = LrView.bind ("title1")},
f:static_text {title = LrView.bind ("title2")}}}



No Responses!