I'm working in Moho 12.2 and trying to change labels on an existing button to let people know if they have been assigned values or not. In a nut shell, I am using:
function OG_Camera_Manager:HandleMessage(moho, view, msg)
if (msg == self.BUTTON1) then
LM_BUTTON.BUTTON1:SetLabel("xxxx")
end
end
The result is an error: attempt to index global 'LM_BUTTON' (a nil value).
Any help would be appreciated.
Sorry to be a newb.
Button Set Label
Moderators: Víctor Paredes, Belgarath, slowtiger
-
- Posts: 13
- Joined: Mon May 15, 2017 11:51 am
- synthsin75
- Posts: 10253
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Button Set Label
LM_BUTTON is called using LM.GUI.Button(), so you'd need to assign that to a variable like:
local BUTTON1 = LM.GUI.Button()
Then you can use the LM_BUTTON methods on BUTTON1.
local BUTTON1 = LM.GUI.Button()
Then you can use the LM_BUTTON methods on BUTTON1.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
-
- Posts: 13
- Joined: Mon May 15, 2017 11:51 am
Re: Button Set Label
I'm singing Danke Shoen to you right now.