Home › Forums › General › Programming › Changing Images – what could be wrong in that LUA code › Re: Changing Images – what could be wrong in that LUA code
June 25, 2012 at 12:19 pm
#4460
I really can’t debug this cause only you know how you imagined this to work. I can tell you:
doing this is a bad idea
[code:2k5c4ia1]
comp = filter_slope_mod:getComponent()
comp:setPropertyString ("uiImageButtonResource" , FilterSlopeTypeOn)
[/code:2k5c4ia1]
always check if the object is valid, otherwise the method might be disabled on load
[code:2k5c4ia1]
comp = filter_slope_mod:getComponent()
if comp ~= nil then
comp:setPropertyString ("uiImageButtonResource" , FilterSlopeTypeOn)
end
[/code:2k5c4ia1]
Check your spelling of properties.