I can obviously do this:
Code: Select all
current_var = "hi"
replacement = "hello"
def new_var(x):
store.x = replacement
Code: Select all
textbutton action Function(new_var(current_var))
I've tried variations of Function(new_var(class.current_var)) or including a storing function within the class and tried something like
Code: Select all
class myclass(element):
def __init__(self, current_var):
self.current_var = current_var
def new_var(x):
store.x.current_var = replacement
#x.store.current_var = replacement
#store.self.x = replacement
Code: Select all
textbutton action Function(myclass.new_var(current_var))
Code: Select all
textbutton action Function(new_var(myclass.current_var))
Code: Select all
textbutton action Function(myclass.new_var(myclass.current_var))