Post

Replies

Boosts

Views

Activity

Reply to Getting clicked item index in NSPathControl with pathItems instead of pathComponentCells
Yes. Path titles for files may not be unique, so that is a problem. I've been ******** about NSPathControl for several years and recently filed another bug report which has not even been acknowledged. This thing has never worked with "items", but they refuse to do anything about it, so I'm still using cells, which do work. ClickedPathItem will never return an item in the items array. Also, I need the geometry of each cell, which I use for hover popovers, and you cannot obtain that using items.
Feb ’23
Reply to NSPathControl ClickedPathItem Doesn't Work
Well I'm back, and this bug has never been fixed in Objective C, and I'm pretty sure it also persists in Swift. The problem is that clickedPathItem is readonly and returns a reference to the clicked item, but pathItems is "copy" and does not contain the clicked item. Copies likely also copy the enclosed secretCells. Both indexOfObject: and indexOfObjectIdenticalTo: return NSNotFound and are therefore useless. While I could try to find the index by comparing titles, that is also useless because URL paths can contain multiple titles that are identical. So far, I have not come up with a workaround. I'm trying to get rid of compiler complaints about using deprecated cells.
Jan ’23
Reply to CALayer backgroundFilters quit working in recent MacOS
So far, I've tried the video from WWDC 2020 and the new video from WWDC 2021. Nothing works. It appears to read the kernel ok for CIFilter, but won't even do that when declared as a CIColorFilter (a la WWDC 2020). I'm also confused as the whether the samplers (three) should be passed to the kernel or pass the samples instead. Previously, without Metal, I passed the samplers. (That was the version that used to work, but then didn't.) My MBP is now 7 yrs old, but supposedly should still work. (Waiting anxiously for the new MBP to release.)
Jun ’21
Reply to NSPathControl ClickedPathItem Doesn't Work
Documentation and compiler warnings flag cells as deprecated for NSPathControl and say to use the "item" methods instead.Putting a breakpoint near the end of the above code allows expanding local variables to display the contained "_secretCell" for each "item" as shown in the table. My theory is that the "copy" attribute on the item properties gives you items that are useless in determining the array index of the item that was clicked, because none of them match the "clickedPathItem" returned. However, if you look at the "_secretCell" for clickedPathItem, it does match the clicked _secretCell" in the pathItems array. But you don't have programatic access to the secretCells.A. better solution might be to just return the index of the clicked item."Someone might say "just match the titles". That doesn't work, because paths can contain duplicates. Maybe instead of "indexOfObject" in the array, we might be able to write a routine to match a binary equivalent.
Dec ’19