OSDN Git Service

使用だと思っていたら重大なバグでした
authoryamat0jp <yamat0jp@yahoo.co.jp>
Mon, 27 Sep 2021 13:16:05 +0000 (22:16 +0900)
committeryamat0jp <yamat0jp@yahoo.co.jp>
Mon, 27 Sep 2021 13:16:05 +0000 (22:16 +0900)
Unit1.dfm
Unit1.pas

index 36ce18e..cc94025 100644 (file)
--- a/Unit1.dfm
+++ b/Unit1.dfm
@@ -156,8 +156,7 @@ object Form1: TForm1
     TabOrder = 4
     Tabs.Strings = (
       #12504#12523#12503
-      #12496#12540#12472#12519#12531#24773#22577
-      #12498#12531#12488)
+      #12496#12540#12472#12519#12531#24773#22577)
     TabIndex = 0
     Visible = False
     OnChange = TabControl1Change
@@ -202,23 +201,12 @@ object Form1: TForm1
       Visible = False
       WordWrap = False
     end
-    object Memo5: TMemo
-      Left = 600
-      Top = 24
-      Width = 185
-      Height = 89
-      Lines.Strings = (
-        'JSONObject'#12434#12493#12473#12488#12377#12427#38555#12395#12399#37197#21015#20869#12395#20837#12428#12390#12367#12384#12373#12356#12290)
-      TabOrder = 3
-      Visible = False
-      WordWrap = False
-    end
   end
   object ImageList1: TImageList
     Left = 200
     Top = 88
     Bitmap = {
-      494C010106000800A40010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
+      494C010106000800A80010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
       0000000000003600000028000000400000002000000001002000000000000020
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
index cf23ec1..9b05abb 100644 (file)
--- a/Unit1.pas
+++ b/Unit1.pas
@@ -57,7 +57,6 @@ type
     ToolButton8: TToolButton;
     ToolButton9: TToolButton;
     ToolButton10: TToolButton;
-    Memo5: TMemo;
     Undo1: TAction;
     Past1: TAction;
     Redo1: TAction;
@@ -249,22 +248,11 @@ begin
   for i := 0 to JSON.count - 1 do
   begin
     pair := JSON.Pairs[i];
-    if pair = nil then
-    begin
-      TreeView1.Items.AddChild(item, 'error');
-      Showmessage('\93à\95\94\83G\83\89\81[\82É\82æ\82è\92\86\92f\82µ\82Ü\82µ\82½');
-      TabControl1.TabIndex := 2;
-      TabControl1Change(nil);
-      TabControl1.Show;
-      Exit;
-    end
-    else
-      val := pair.JsonValue;
+    val := pair.JsonValue;
     if val is TJSONObject then
     begin
       s := c + pair.JsonString.ToString + ':';
-      JSON := pair.JsonValue as TJSONObject;
-      loop(TreeView1.Items.AddChild(item, s), JSON);
+      loop(TreeView1.Items.AddChild(item, s), val as TJSONObject);
     end
     else if val is TJSONArray then
     begin
@@ -389,8 +377,6 @@ begin
       Memo2.Text := Memo3.Text;
     1:
       Memo2.Text := Memo4.Text;
-    2:
-      Memo2.Text := Memo5.Text;
   end;
 end;