TGUID not working

TGUIDWrapper is missing part of the implementation. 

I have a working version. Is it possible to merge it to the orginale source.
So I don't have to merge it for every new version, and other people can benefit from it

.

Hello,

any contribution is welcome, but I wonder why do you have to merge it? can't you just register TGUIDWrapper from your own unit?

I'm new to Scripter so I did not think about that :-) 

So just register again and the new will be the active one, or do I have to unregister the old?

Anyway here you have the one I use, only D4 was missing.

  TGUIDWrapper = class(TatRecordWrapper)
  private
    FD1: LongWord;
    FD2: Word;
    FD3: Word;
    FD4: array[0..7] of Byte;
    function GetD4(Index: Integer): Byte;
    procedure SetD4(Index: Integer; const Value: Byte);
  public
    constructor Create(ARecord: TGUID);
    function ObjToRec: TGUID;
  public
    property D1: LongWord read FD1 write FD1;
    property D2: Word read FD2 write FD2;
    property D3: Word read FD3 write FD3;
    property D4[Index: Integer]: Byte read GetD4 write SetD4;
  end;



implementation

constructor TGUIDWrapper.Create(ARecord: TGUID);
var i:Integer;
begin
  inherited Create;
  FD1 := ARecord.D1;
  FD2 := ARecord.D2;
  FD3 := ARecord.D3;
  for I := 0 to 7 do
    FD4 := ARecord.D4;
end;

function TGUIDWrapper.GetD4(Index: Integer): Byte;
begin
  Result:= FD4[Index];
end;

function TGUIDWrapper.ObjToRec: TGUID;
var i:Integer;
begin
  result.D1 := FD1;
  result.D2 := FD2;
  result.D3 := FD3;
  for I := 0 to 7 do
    Result.D4 := FD4;
end;

procedure TGUIDWrapper.SetD4(Index: Integer; const Value: Byte);
begin
 FD4[Index]:=Value;
end;
 

Yes, when you call DefineClass(TGuidWrapper) is just overwrites the previous one.