Index: oup/current/FileClasses/TXMP.pas
===================================================================
--- oup/current/FileClasses/TXMP.pas	(revision 231)
+++ oup/current/FileClasses/TXMP.pas	(revision 232)
@@ -10,4 +10,5 @@
     public
       procedure InitDataFields; override;
+      procedure InitEditor; override;
   end;
 
@@ -15,5 +16,6 @@
 
 uses
-  ConnectionManager, Math, Classes, TypeDefs, _DataTypes;
+  ConnectionManager, Math, Classes, TypeDefs, _DataTypes, ExtCtrls, StdCtrls, 
+  Controls, Forms;
 
 { TFile_TXMP }
@@ -106,4 +108,32 @@
 
 
+procedure TFile_TXMP.InitEditor;
+var
+  group: TGroupBox;
+  splitter: TSplitter;
+begin
+  inherited;
+  FEditor := TFrame.Create(nil);
+  group := TGroupBox.Create(FEditor);
+  group.Align := alTop;
+  group.Height := 150;
+  group.Caption := '1. ';
+  group.Parent := FEditor;
+
+  splitter := TSplitter.Create(FEditor);
+  splitter.Align := alTop;
+  splitter.Top := group.Height + 10;
+  splitter.AutoSnap := False;
+  splitter.MinSize := 100;
+  splitter.Beveled := True;
+  splitter.Height := 8;
+  splitter.Parent := FEditor;
+
+  group := TGroupBox.Create(FEditor);
+  group.Align := alClient;
+  group.Caption := '2. ';
+  group.Parent := FEditor;
+end;
+
 end.
 
Index: oup/current/FileClasses/_FileTypes.pas
===================================================================
--- oup/current/FileClasses/_FileTypes.pas	(revision 231)
+++ oup/current/FileClasses/_FileTypes.pas	(revision 232)
@@ -34,4 +34,5 @@
       function GetRawPartByIndex(ID: Integer): TRawDataInfo;
       function GetChildCount: Integer;
+      function GetRawCount: Integer;
     public
       constructor Create(ConnectionID, FileID: Integer); virtual;
@@ -58,4 +59,5 @@
       property FieldByIndex[ID: Integer]: TDataField read GetFieldByIndex;
 
+      property RawCount: Integer read GetRawCount;
       property RawPartByOffset[Offset: Integer]: TRawDataInfo read GetRawPartByOffset;
       property RawPartByIndex[ID: Integer]: TRawDataInfo read GetRawPartByIndex;
@@ -177,8 +179,36 @@
 end;
 
+function TFile.GetRawCount: Integer;
+var
+  i: Integer;
+begin
+  Result := Length(FRawParts);
+  if Result > 0 then
+  begin
+    Result := 0;
+    for i := 0 to High(FRawParts) do
+      if FRawParts[i].RawSize > 0 then
+        Inc(Result);
+  end;
+end;
+
 function TFile.GetRawPartByIndex(ID: Integer): TRawDataInfo;
-begin
-  if ID < Length(FRawParts) then
-    Result := FRawParts[ID]
+var
+  i: Integer;
+  valids: Integer;
+begin
+  if ID < GetRawCount then
+  begin
+    valids := 0;
+    i := 0;
+    repeat
+      if FRawParts[i].RawSize > 0 then
+      begin
+        Inc(valids);
+      end;
+      Inc(i);
+    until valids > ID;
+    Result := FRawParts[i - 1];
+  end
   else
     with Result do
