Hello,
Looking for information about the current event.
I would like to see the information that is shown in the “Stack” area of the debugger like: ObjName1.ObjName2.KeyUp
“Me” will supply some of the information, but I’m not sure how to get the Event’s name. Is there a function for this? I would use it like: MyHappening(Me, EventInfo)
Thanks -KC
The CurrentMethodName constant would be the Event name if it’s inside an Event.
2 Likes
If you really want the entire stack, you can do this:
Public Function getStackString() As String
var result() as String '// Setup our return variable
#Pragma BreakOnExceptions Off '// Disable BOE
try
'// Create and raise an exception
var e as new RuntimeException( "Show me a stack!" )
Raise e
catch e as RuntimeException
'// Grab the exception's stack
result = e.Stack
'// Remove the first element, which is this function
result.RemoveAt(0)
end try
#Pragma BreakOnExceptions Default '// Reset BOE
'// Return the stack
Return String.FromArray( result, EndOfLine )
End Function
Call as:
var stack as String = getStackString
4 Likes
CurrentMethodName was the immediate solution.
I don’t need the entire stack yet, but I’ll know how to get it now.
Thanks all.
Then please mark Tim’s answer as the solution.
2 Likes