function A = subsasgn(A,S,B)
%SCRIBEHGOBJ/SUBSASGN

%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.7 $  $Date: 1997/12/06 00:41:31 $
%   J.H. Roh & B.A. Jones 4-25-97.

switch S.type
case '.'
   switch S.subs
   case 'HGHandle'
      A.HGHandle = B;
   case 'IsSelected'
      A.ObjSelected = B;
   otherwise
      A = set(A,S.subs,B);
   end
case '()'
   % I don't think this works...
   structA = struct(A);
   structA(S.subs{:}) = struct(B);
   A = class(A,'scribehgobj');
end

