View Single Post
Old 11-24-2019, 08:50 AM   #6
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 813
Default

Quote:
Originally Posted by Lokasenna View Post
The exec method specifically calls the function assigned to func, so yes - if you overwrite mouseup directly to add our code instead of passing a function, exec won't work.
I am not sure I understand right.....

What I did was to replace
Code:
 function GUI.elms.Start_Cont_Button:onmouseup()
  GUI.Button.onmouseup(self)
-- Lots of code  
end
with

Code:
 function startButton()
 -- Lots of code
end
and added func = startButton to GUI.New ("Start_Cont_Button")-table
like this:

Code:
GUI.New("Start_Cont_Button", "Button", {
  z = 11,
  x = 32.0,
  y = 128.0,
  w = 100,
  h = 30,
  caption = "START!",
  font = 2,
  col_txt = "txt",
  col_fill = "elm_frame",
  func = startButton
})
But clicking the button did nothing. ? Shouldn't that do the thing?
Trying to understand ....but....dont.

The solution I had worked though.
__________________
ToDoList Obliques MusicMath Donation Some of mine and my friends music projects on Spotify
tompad is offline   Reply With Quote