function B = loadobj(A)
%CELLTEXT/LOADOBJ

%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.2 $  $Date: 1998/08/25 19:14:01 $


if strcmp(class(A),'celltext')
   % fixes for context menus
   try
      % struct(A)
      % HG = get(A,'MyHGHandle')
      uic = get(HG,'UIContextMenu');
      if isempty(uic)
         % this should only be true for R11 beta 3
         uic = getappdata(HG,'ScribeUIContextMenu');
         set(HG,'UIContextMenu',uic);
      end
      if ~isempty(uic)
         colorMenu = findall(uic,'Tag','ScribeAxistextObjColorMenu');
         set(colorMenu,...
                 'Callback','domethod(getobj(gco),''editcolor'')');
      end
      B=A;   
   catch
      delete(HG);
      B=[];
      % object is irretrievably corrupted...
   end
   
end
