Re: Changing Images – what could be wrong in that LUA code

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

#4461
Cramp
Participant
  • Topics: 11
  • Replies: 66
  • Total: 77
"atom":2ytp1jfd wrote:
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:2ytp1jfd]
comp = filter_slope_mod:getComponent()
comp:setPropertyString ("uiImageButtonResource" , FilterSlopeTypeOn)
[/code:2ytp1jfd]

always check if the object is valid, otherwise the method might be disabled on load
[code:2ytp1jfd]
comp = filter_slope_mod:getComponent()
if comp ~= nil then
comp:setPropertyString ("uiImageButtonResource" , FilterSlopeTypeOn)
end
[/code:2ytp1jfd][/quote:2ytp1jfd]

ok, I have added this into the code. Thank you mate <img loading=” title=”Smile” />
Have you seen XML data and extra pictures? The strange behavior of the CtrlR
Check your spelling of properties.

Ctrlr