Discovery of calling routine
Posted: Tue Jun 19, 2018 9:44 pm
If I have a script and it calls a function, can the function know what script called it?
This would be very useful in debugging.
This would be very useful in debugging.
Questions and answers about the LiveCode platform.
https://www.forums.livecode.com/
Code: Select all
on Command01
put theFunction() into theAnswer
end Command01
on Command02
put theFunction() into theAnswer
end Command2
function theFunction
return ThisText
end function
Code: Select all
function theFunction
put item -2 of line -2 of the executionContexts into tHandler
return ThisText && tHandler
end function