Post

Replies

Boosts

Views

Activity

Comment on For cursor update events (with NSTrackingArea) how to know if it's coming or going?
Okay, I got it working now. Strangely, your example (translated to Obj-C) did not work for me until I removed the NSTrackingCursorUpdate flag from the tracking area. If I have that flag, then I have to set the cursor in the cursorUpdate method. My calls to set or push an NSCursor in the mouseEntered/Exited are ignored. If I remove that flag, then the calls in mouseEntered/Exited work as you have them here. Thanks!
Topic: UI Frameworks SubTopic: AppKit Tags:
Oct ’22
Comment on Equivalent of coalescedTouchesForTouch in AppKit?
I think coalesced events are a different thing. That allTouches is (I believe) for when multiple fingers are on the screen or touchbar at the same time. Whereas "coalesced" means when the user is moving something like a stylus very fast, so you get one event but it has a kind of backlog of multiple events or touch/stylus positions inside it. Normally you might not care, but for a drawing app your want that path.
Topic: UI Frameworks SubTopic: AppKit Tags:
Aug ’25
Comment on Detect option key is pressed when menu selected
I'd like to do this in SwiftUI and macOS. I can change menus in response to state, but I need a nice way to globally observe the option key.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Jul ’22
Comment on Bad: OutlineGroup is not lazy loading children?
No. I ended up writing my own outline view from scratch, that dealt with lazy disclosure. Maybe I should open source it? I don't know if there is a better way. If you find one, please share it here.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22
Comment on Bad: OutlineGroup is not lazy loading children?
I put the code that I wrote before in a package. See my answer.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22
Comment on Detect option key is pressed when menu selected
Actually I take that back. Even if I can observe option key state, if I change state when the menu is open, the menu just closes, instead of rebuilding and displaying, which would give the AppKit-like behavior.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Jul ’22
Comment on For cursor update events (with NSTrackingArea) how to know if it's coming or going?
(I'm editing this comment after you added some content to your post.) I see now, you're using the mouseEnter/Exit flags with the tracking area. I'll try that now.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on For cursor update events (with NSTrackingArea) how to know if it's coming or going?
Okay, I got it working now. Strangely, your example (translated to Obj-C) did not work for me until I removed the NSTrackingCursorUpdate flag from the tracking area. If I have that flag, then I have to set the cursor in the cursorUpdate method. My calls to set or push an NSCursor in the mouseEntered/Exited are ignored. If I remove that flag, then the calls in mouseEntered/Exited work as you have them here. Thanks!
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on App compiles but "Unable to install" on device
Yes, I've restarted the phone and Xcode. The phone is showing in the Devices window. Other apps compile and run on the phone.
Replies
Boosts
Views
Activity
Sep ’24
Comment on Important item in Keychain seems to have disappeared (after years)
Thank you so much. I will read study those links more today and later as I have time. I added a reply with some further info; I wasn't sure if a comment like this would accept source code snippets.
Replies
Boosts
Views
Activity
Mar ’25
Comment on Equivalent of coalescedTouchesForTouch in AppKit?
I think coalesced events are a different thing. That allTouches is (I believe) for when multiple fingers are on the screen or touchbar at the same time. Whereas "coalesced" means when the user is moving something like a stylus very fast, so you get one event but it has a kind of backlog of multiple events or touch/stylus positions inside it. Normally you might not care, but for a drawing app your want that path.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Aug ’25