translate z , get_z

if i move an object on screen by using the glui translate in z direction button, and use the get_z() function to get the value of z of the object in the window, i dont get the solution.

trans_z =
glui2->add_translation( “Objects z”, GLUI_TRANSLATION_Z, &obj_pos1[0] );
trans_y->set_speed( 1.0);
glui2->add_column( false );
z_value = trans_z->get_z();

this is my piece of code.
What is the error, why does it not read the value of z?