Yes, it is working.
Thx a lot.
Post
Replies
Boosts
Views
Activity
Thx for that.
I didn't know the trick with Dictionary by grouping, very useful !
If I understand well, we can group by a parameter and then another, right ?
So in my case, I'd like to have [artist[album[title, title, title, title]][album[title, title, title]][album[title, title, title, title, title]][album[title]]] to have a tree.
So I need to do multiple Dictionary with maps in the for() or can I group directly in one dictionary ?
Thx.
I tried :
func searchFieldDidEndSearching(_ sender: NSSearchField) {
_filterTracks(str: "")
}
And same result >>> the NSTableView is empty now... Logical because it's looking for items which contains an empty string and there is not...
Or is there a reloadData() or something to call is this case ?
Thx for your answer.
I initialize the dataSource on the self (like often).
After that I set the tracks with a setter and I reload the datas :
`var tracks: [NSObject]? {
set {
datas = newValue
DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) { [weak self] in
self!.tracksListTableView.reloadData() // to avoid the init bug...
}
}
get {
if let tracks: [NSObject] = datas as? [NSObject] {
return tracks
}
return nil
}
}
My bad but my project has 2 years old and I don't even remember how I plug the datas to the TableView... In the inspector ?
Thx.