質問編集履歴
1
エラー発生個所が間違っておりました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
### 発生している問題・分からないこと
|
8
|
-
|
8
|
+
Parentに子データの配列「children」を渡そうとするとParentにセットできないでエラーになります。
|
9
9
|
そもそものアプローチの仕方が間違っているのでしょうか?
|
10
10
|
|
11
11
|
|
@@ -94,8 +94,8 @@
|
|
94
94
|
|
95
95
|
|
96
96
|
Button("Add") {
|
97
|
-
let newItem = Parent(hiduke: txtHiduke, kion: txtKion, children: children)
|
97
|
+
let newItem = Parent(hiduke: txtHiduke, kion: txtKion, children: children) //←エラー発生個所
|
98
|
-
modelContext.insert(newItem)
|
98
|
+
modelContext.insert(newItem)
|
99
99
|
}
|
100
100
|
}
|
101
101
|
}
|