Nice!
Thanks for that.
Code: Select all
on mouseUp
Answer the short name of me -- of this control
Answer the short name of this card
Answer the short name of this stack
Answer the currentcard of this stack
-- --Answer the name of the script --of me
--Answer the name of the executionContext
local tHandler
-- answer executionContexts
put item -2 of line -1 of the executionContexts into tHandler
answer "An error occurred in the handler: " & tHandler
end mouseUp
Is there anyway to enumerate this structure?
i.e. - Important: The value of the executionContexts may be changed in future versions of LiveCode
Sometimes there are hidden or special MessageBox keywords that allow us to display structures.
I'd just like to be able to know the item names of the executionContexts content.
oops - just found this:
Value
The executionContexts is similar to a call stack, it consists of a list of contexts, one per line, with the most recent context at the end.
Each context is a string of the form:
<object-long-id>,<handler-name>,<line-number>
button id 1003 of card id 1002 of stack "C:/LiveCode/ErrorTrapping.livecode",mouseUp,17
object-long-id = button id 1003 of card id 1002 of stack "C:/LiveCode/ErrorTrapping.livecode"
handler-name = mouseUp
line-number = 17
is there a way to pull out the Name of button id 1003 and the Name of button id 1003?
Code: Select all
Answer the short name of me -- of this control
Answer the short name of this card
Answer the short name of this stack
yeah OK getting circular redundancy here in my thinking. LOL