Assertion Failed for catalog.createKeyword


i new developing on lightroom sdk , trying build script add keywords catalog.  here contents of current script:

 

local lrapplication = import 'lrapplication'

local lrdialogs = import 'lrdialogs'

local catalog = lrapplication.activecatalog()

 

 

gkmenuitem = {}

 

 

function gkmenuitem.runprocess()

          catalog:withwriteaccessdo("setkeywords",gkmenuitem.setkeywords())

 

 

end

 

 

function gkmenuitem.setkeywords()

          local test='default'

          local catphotos = catalog.targetphotos

          local mykeyword = catalog.createkeyword( 'xyza: test', {}, true, nil  )

 

 

          for _, photo in ipairs( catphotos )

                    -- loop through each of photos.

                    -- photo.setkeyword(mykeyword)

 

 

                    lrdialogs.message(test)

          end

 

 

end

 

 

import 'lrtasks'.startasynctask( gkmenuitem.runprocess )

 

the problem have 'assertion failed!' message createkeyword statement whenever run.   i've tried lot of variations without success.  using lightroom 3.6 on osx lion 10.7.4.

 

any ideas appreciated!

 

thanks

glyn

catalog:createkeyword not catalog.createkeyword

 

(colon, not dot)



More discussions in Lightroom SDK


adobe

Comments