Hello,
I was messing around with Lucia (via Python) and I came across the idea of Callback functions. now, I"ve seen these before, however the wording confused me a little.
It tells me to pass a function to the class, however...
I'm asuming this would be a string of the function name, because if I directly called the function, it would just contain the returned information. However, I'm confused at just passing it a string. How does it trace this to a relative file path.
For example: I have some random functoin:
def myCallback ():
print ("Stuff happens... Yea!")
Then, I pass that to a callback variable inside the Lucia Module.
ui = lucia.ui.menu2 () #This doesn't actually work because it isn't enabled.
ui.callbackFunction = "myCallback"
My confusion on this matter is that the calling of the actual Callback occurs in the run loop inside Lucia. How, then, does it know which actual function I am referring to wen I pass it a string such as this.
Am I misunderstanding the process? Is there a better way to do Callbacks?
Thank you.
“Yes, sir. I am attempting to fill a silent moment with non-relevant conversation.”
“You don’t tell me how to behave; you’re not my mother!”
“Could you please continue the petty bickering? I find it most intriguing.” – Data (Star Trek: The Next Generation)