[JW Lua] DataListRow:AddCopy

Chris marcel.denio at gmail.com
Fri Dec 18 14:29:55 CET 2015


Jari

I must call "ClearAll" before "AddCopy" (for FCDataListRow),
otherwise it does not work.
Is-it right ?
(CopyFrom is OK)

---------------------------------------
local function createString(text)
     local str=finale.FCString()
     str.LuaString = text
     return str
end

local function addRow(dataList,dataRows)
     local dataListRow = dataList:CreateRow()
     dataListRow:ClearAll()      --  ?????????
     for  k, v in ipairs(dataRows) do
         dataListRow:AddCopy(createString(v))
     end
end

local cw = finale.FCCustomWindow()
cw:CreateOkButton()
cw:CreateCancelButton()

local dl = cw:CreateDataList(10,10)
dl.UseCheckboxes = true
dl:AddColumn(createString("Column1"),100)
dl:AddColumn(createString("Column2"),100)
addRow(dl,{"row1-col1","row1-col2"})
addRow(dl,{"row2-col1","row2-col2"})

local ret = cw:ExecuteModal(nil)
---------------------------------------

Best regards

Chris




More information about the JWLua mailing list