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

%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 1.8 $  $Date: 2000/06/01 02:52:59 $
%   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

