modifications to compile  under Linux maya 2012  and  also work correctly as a field  in the dynamic relationships  editor