Closed Mx-Iris closed 8 months ago
I created a custom TableView causing swizzled to execute repeatedly, should not use self
as the object of the associated object, should use NSTableView.self
to ensure it only executes once!
Thanks! I can't replicate the error regarding swizzling. How did you swizzle your table view?
@flocked You need to create a custom class that inherits from NSTableView
, then create an NSTableView
, and use TableViewDiffableDataSource
to reproduce the error. Since the custom TableView and NSTableView
are different class objects, their didSwizzle
properties are not the same.
TableViewSwizzledIssue.zip
This is a reproduced example, because the repeated exchange method caused makeView(withIdentifier: identifier, owner: nil)
to call to Apple's original implementation, which did not create CellClass.
I tried to fix the building error, and also NSTableViewDataSource should not strongly reference NSTableView.