Post

Replies

Boosts

Views

Activity

Reply to Class name duplication between core data and Apple private framework
It seems I didn't have a choice, so I renamed the class. I used @compatibility_alias, but I still needed to update the encoding and decoding of objects to maintain backward and forward compatibility . I guess I should have added prefixes to class names in the first place, but Apple may consider using more specific names for its (private) classes as well. "Trace" is very generic.
Sep ’24
Reply to Core data turning objects into faults inappropriately
Hi Chen. I too wonder why the binding does not bring back the object's attributes. Here a link to a simple project. https://upoitiers86-my.sharepoint.com/:u:/g/personal/jean_peccoud_univ-poitiers_fr/Eap9s3nnTfZGod0dfcDzhZ4BS6KVlJ-XCChuzsEhQyjpwA?e=YmSvqb To reproduce the issue, just click the "Swap folders" buttons, which reorders two Folder objects in an ordered to-many relationships, then saves the context (see swapFolderPositions: in AppDelegate.m). The name attributes of the folders are bound to two text fields, and you will see a name disappear when a folder is turned into a fault (a message is logged in the console when that happens, since I override willTurnIntoFault.
Aug ’24
Reply to Core data turning objects into faults inappropriately
Of note, objects that turn into faults are those that has no pending changes, that is, those that were not inserted nor removed in/from the ordered collection. I can avoid the issue by making dummy changes to these objects, such that they don't turn into faults during the next save, but I'd like to understand the root cause. Maybe I don't know how to manage ordered collections properly. To insert an object, I use insertObject:inSubfoldersAtIndex and I don't modify other objects of the collection. Should I reorder all objects? The documentation says little about ordered to-many relationships.
Aug ’24
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
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