Post

Replies

Boosts

Views

Activity

Reply to can't get correct NSScrollView tiling with rulers
Ok, it turns out that if I send the last two messages above to the clipView with self.contentView.automaticallyAdjustsContentInsets = NO; self.contentView.contentInsets = NSEdgeInsetsMake(0, 0, 0, 0); AppKit no longer tries to scroll the view too far. But the clipView still shows behind the rulers, as opposed to what the documentation says. At least, I can do my custom tiling.
Mar ’22
Reply to Simple core data app doesn't support undo
I can't get a clear answer to this, but as online stuff describes how to implement undo in core data with code and does not appear to mention automatic undo, I'm coming to the conclusion that core data apps simply no longer support this ("automatic" as in "you don't have to code anything"). Can anyone confirm that I have to implement undo support with code? It would help if I got an answer to this instead or looking for how to make this work as it used to.... Thanks.
Mar ’22
Reply to WARNING: Application performed a reentrant operation in its NSTableView delegate. This warning will become an assert in the future.
I'm getting this warning on an Obj-C Mac App using an NSOutlineView. This not specific to SwiftUI. This appears to happen when I ask the outline view to load several "parent" rows that are not visible (they extend below the visible rect). Hence, this only happens when I load a certain number of rows (or more), be it with -reloadData or -insertItemsAtIndexes:inParent:withAnimation:. The total height of the rows that are loaded appears to be a factor, since I get this waning when I load fewer rows if rows are taller. It may happen with only 5 rows. It seems I only get the warning if the rows that are loaded have child rows (i.e., they represent parent items with children). When I load only "child" rows (with -insertItemsAtIndexes:inParent:withAnimation: and inParent is not nil), I don't get this warning, even if I load many, many children. I don't like this. I didn't get the warning before I update to Ventura/Xcode 14.2.
Jan ’23
Reply to Is "responsive scrolling" still a thing in modern macOS?
Of note: preparedContentRect is called, but a call to super within the method returns NSZeroRect, which contradicts the documentation where it is said that the rectangle always includes the visible portion of the view. Returning the view's bounds from this method doesn't change anything. No overdraw appears to be performed, the visible rectangle is redrawn at each scroll step. Setting the layerContentsRedrawPolicy to NSViewLayerContentsRedrawNever does nothing to the scrolling behaviour. Again, the visible rectangle is redrawn at each scroll steps. I wonder how appkit does it btw, because with this setting, setNeedsDisplay does not redraw the view (which is expected). To sum up: whatever I do, appkit wants to redraw the visible rectangle during scrolling. This is a regression from macOS 10.0, which at least had copiesOnScroll to avoid doing unnecessary calculations to redraw only the part of the view that becomes visible.
Oct ’23
Reply to How CATiledLayer works internally
Hi. In case you're still around, I'd like to know what solution you've found to your problem. I too need to draw curves on a view that can be very wide, and a single CALayer cannot handle it (even if drawing is constrained to a small rectangle). My current solution is to use several contiguous CALayers, which is less than ideal...
Nov ’23