Post

Replies

Boosts

Views

Activity

Comment on [ITLib] Get a tree of artists / albums (Mac OS Swift app)
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.
Nov ’21
Comment on Resetting a NSPredicate
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 ?
Nov ’21
Comment on Adding / Removing items from a NSTableView
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.
Oct ’21