I opened a layout from library manager and now I want to run a "callback" when I descend in the hierarchy and return to the top level. I found some information about "adding a preObjAccess Trigger to ddGetObj" but I'm not sure whether this is the right way to solve my issue.
When I register this trigger with the code
ddRegTrigger( "PreObjAccess" 'testfunc)
procedure( testfunc(theLibName theCellName theViewName theFileName theContextId theMode)
printf("%L %L %L %L %L %L" theLibName theCellName theViewName theFileName theContextId theMode)
and I descend in the layout hierarchy this function prints a lot of lines looking like:
"testLib" "testCellView" "layout" nil nil nil
"testLib" "testCellView" nil nil nil "r"
"testLib" "testCellView" "symbol" nil nil "r"
Because of these outputs I'm not sure how to deal with this trigger. Perhaps it is not the right way to handle my needs.
You should use deRegUserTriggers to do this - the args DPL passed into the triggers gives an action to say whether you were pushed, popped etc.
In reply to Andrew Beckett:
thanks a lot for your hint. I have implemented my function using this trigger and it works fine.