Post

Replies

Boosts

Views

Activity

*** -colorSpaceName not valid
Here is a relatively simple code fragment: let attributedQuote: [NSAttributedString.Key: Any] = [ .font: FieldFont!, .foregroundColor: NSColor.red] let strQuote = NSAttributedString.init(string:"Hello World", attributes:attributedQuote) strQuote.draw(in: Rect1) It compiles without an issue, bur when I execute it, I get: "*** -colorSpaceName not valid for the NSColor <NSColor: 0x6000005adfd0>; need to first convert colorspace." I have tried everything I can think of. What's going on?
0
0
140
1w
Common blocks in Swift?
I am porting an old app from ObjC. The app uses many defined constants such as: #define COM_OFFSET 12.5 and many variables that are read and/or written throughout the App, such as: PCDate* Dates[367]; @class PCMainView; PCMainView* MainView; in one file called "PCCommon.h" How do I duplicate this function in Swift? I have looked around and have found no help. Thanks in advance.
1
0
181
2w
App behavior changed under Sequoia 15.1.
I have an old Objective-C app that has been running for several years. The last compilation was in February 2024. I just upgraded to Sequoia 15.1. The app has four subviews on its main view. When I run the app only the subview that was the last one instantiated is visible. I know the other subviews are there, because a random mouse click in one invisible view causes the expected change in the visible view. What changed in 15.1 to cause this?
4
0
373
Nov ’24
App that runs fine under Xcode 15 does not work on Xcode 16.
When I upgraded to Sequoia 15.1, an app that worked fine under OS 14 stopped working. Out of 4 views on the main screen, only 1 is visible. Yet, if I click where another view should be, I get the expected action so the views are there, just not visible. Only I can't see where I am clicking! I had to upgrade to Xcode 16 to recompile the app and run it in Debug mode. When I do, I get the following: NSBundle file:///System/Library/PrivateFrameworks/MetalTools.framework/ principal class is nil because all fallbacks have failed. Can't find or decode disabled use cases. applicationSupportsSecureRestorableState FWIW - the only view that actually shows up is the last subview added to the main view.
2
1
428
Nov ’24
NSScrollView of a large graphic jumps when scrolling on OSX Ventura (13.0.1)
This is an internal app that displays a large NSView (50K x 25K pixels) within a NSScrollView the size of my 27" iMac. The code worked fine, scrolling both ways was very smooth, under the latest release of OS-X 12. I upgraded to 13.0.1 and now the scrolling jerks every ~ 500 pixels in either direction. I am using XCode 14.1 and writing in Objective-C. I notice the NSLog now contains the message "Metal API Validation Enabled" which it never did before. Is this a bug or has something fundamental changed in Ventura which requires changing the viewing code. (Memo to self: NEVER install a ".0" release. Let somebody else be the guinea pig.) Thanks for whatever help you can provide. Ron
1
0
874
Dec ’22
OSX NSFileManager Error 513
I am developing a new OS-X App. When I try to save a file using an internally-generated file name based on the most-recently read file, I get Error 513. Saving to a file whose name comes from NSSavePanel works fine. What privilege is the App missing? Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “2022-09-03.xml” in the folder “2022”." UserInfo={NSFilePath=/Volumes/HDD2/Documents/OS-X Apps/Polls/2022/2022-09-03.xml, NSUnderlyingError=0x600002765740 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
2
0
1.7k
Sep ’22