Not exactly best practice, but still a helpful way to make code dependent of the calling class.
The specific calling method can also be identified with the _caller string: "ClassName\\methodName"
boolean calledBy(str _caller)
{
container stack = xSession::xppCallStack();
for(int i=3;i<=conLen(Stack);i+=2)
{
if(strScan(conPeek(stack,i),_caller,1,9999))
{
return true;
}
}
return false;
}

Leave a Reply