class library: Tdef inherits its envir when forking and passing an event