function aObj = editopen(aObj)
%AXISTEXT/EDITOPEN

%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.7 $  $Date: 1998/09/18 19:25:24 $


aObj = set(aObj,'Editing','on');
HG = get(aObj,'MyHGHandle');

% save current changes
ud = getappdata(HG,'ScribeObjectData');
ud.ObjectStore = aObj;
setappdata(HG,'ScribeObjectData',ud);

fig = get(get(HG,'Parent'),'Parent');
plotedit(fig,'setsystemeditmenus');
waitfor(HG,'Editing','off');

if ishandle(HG) 
   if ishandle(fig)
      plotedit(fig,'setploteditmenus');
   end
   % aObj may have changed, since there was a click to 
   % deactivate editing
   A = getobj(HG);
   aObj = A.Object;
else
   aObj = [];
   % domymenu.m or @scribehandle/doclick will catch this...
end