检查样式的未启动textInputLayout.setHintTextAppearance(R.style.text_in_layout_hint_Style);
会抛出运行时错误94:无效使用Null 。
如果ThisWorkbook.Styles(1).IndentLevel则
检查样式func numberOfSections(in collectionView: UICollectionView) -> Int {
return 1
}
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return results.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
print("Cell For Row -> \(indexPath)")
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ResultCell", for: indexPath) as! ResultCell
cell.data = result[indexPath.item]
return cell
}
或.IndentLevel
的未启动.IndentLevel
是否也会抛出运行时错误94:无效使用空。
如果是IsNull(ThisWorkbook.Styles(1).IndentLevel)那么 如果是IsError(ThisWorkbook.Styles(1).IndentLevel)那么
IsNull
IsError
这是On Error Resume Next
Call IsNull(ThisWorkbook.Styles(1).IndentLevel)
If Err.Number <> 0 Then
End If
On Error GoTo 0
属性本身内部未处理的Sub TestIndent()
With ThisWorkbook.Styles.Add("Test - IndentLevel")
On Error Resume Next
Debug.Print .IndentLevel
If Err.Number <> 0 Then Debug.Print "Error - .IndentLevel:"; .Err.Number, Err.Description
Err.Clear
Debug.Print IsNull(.IndentLevel)
If Err.Number <> 0 Then Debug.Print "Error - IsNull(.IndentLevel):"; Err.Number, Err.Description
On Error GoTo 0
.IndentLevel = 1
Debug.Print "No Error - .IndentLevel:"; .IndentLevel
Debug.Print "No Error - IsNull(.IndentLevel)"; IsNull(.IndentLevel)
.Delete
End With
End Sub
错误吗?