SDK Gratuitous difference in static_text between Mac and Windows

  • 2
  • Problem
  • Updated 7 years ago
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")}}}

end)
Photo of John R. Ellis

John R. Ellis, Champion

  • 3586 Posts
  • 926 Reply Likes

Posted 7 years ago

  • 2

Be the first to post a reply!