I use IKSaveOptions to add an accessory view to an NSSavePanel to give the user choice of the image file type (etc) used to save a file. I limit the available file type choices in the accessory's menu by specifying a delegate object that offers the saveOptions:shouldShowUTType: method.
Historically, my delegate was called repeatedly (for many file types) so, for those not supported by my code, I was able to omit them from the menu. This is expected behaviour from my interpretation of the documentation for saveOptions:shouldShowUTType:
As of Ventura 13.1, the delegate was not called at all; instead, the entire (or at least a long) list of options was offered in the panel. Running the same build of my code on Catalina 10.15.7 still had the historical behaviour.
In Sonoma (14.0) the delegate was called exactly once (for JPEG). This behaviour persists in Sequoia 15.1.1 .
I have used test code and breakpoints to ensure that I pass a valid reference to my delegate and to inspect when (if) it is called.
If there is some (new?) pre-condition for the accessory's use needed on Ventura and later, or a workaround, I would be grateful to be pointed to it.
Post
Replies
Boosts
Views
Activity
I have a problem with rulers in an NSTextView. My code has worked fine from about Sierra (10.12), up to Ventura (13), it stopped working in Sonoma and continues to fail in the same way in Sequoia (14 - 15). When I display the ruler, the contents of the text area disappears leaving just a pale grey background. When I make the ruler invisible again the text reappears.
No errors are reported (at compile or run time). I have tried adding refreshes of the text view in various places with no result. I have (for Sequoia) used Interface Builder to force the text view to use TextKit 1, also with no success. I’m at a loss as to how to proceed because I’m not getting any diagnostics, simply changed behaviour.
My app provides a programming IDE. It includes a program editor that uses line numbering code for an NSTextView from WWDC/Noodlesoft. The line numbers are shown in the ruler which is sometimes visible and sometimes not. When I display the ruler, I also set the main text to not editable but removing this setting does not appear to make any difference.
Any suggestions would be very wel
PLATFORM AND VERSION
macOS, Objective C
Development environment: Xcode Version 16.0 (16A242d) [and previously Xcode 15], macOS All releases of Sonoma and Sequoia 15.0.1 (24A348)
Run-time configuration: macOS Sequoia 15.0.1 (24A348)
The sequence is essentially:
[editTextView setEditable:NO];
[self showRulerIn:editTextView visible:YES];
Using:
-(void)showRulerIn:(NSTextView*)editorTv visible:(BOOL)vis {
NSScrollView *scrollV = [editorTv enclosingScrollView];
NSClipView *clipV = [scrollV contentView];
MBEditorTextView *textView = (MBEditorTextView*)[scrollV documentView]; // The actual text
[scrollV setRulersVisible:vis]; // Creates the ruler if necessary
…
return; }
LINE NUMBERING CODE
The line number code comes from 2 sources but they are so similar that one must be derived from the other:
Apple’s WWDC 2010 code at: https://download.developer.apple.com/videos/wwdc_2010__hd/session_114__advanced_cocoa_text_tips_and_tricks.mov
Noodlesoft's code at: https://www.noodlesoft.com/blog/2008/10/05/displaying-line-numbers-with-nstextview/