Skip to main content

All Questions

Tagged with
0 votes
1 answer
42 views

Appkit Cocoa - NSCoding decoding error - NSCocoaErrorDomain 4864

I'm having some trouble with NSCoding, I have this simple "Grade" class: @interface Grade : NSObject<NSCoding> @property (copy) NSString *name; @property NSInteger grade; @end It ...
IRP_HANDLER's user avatar
0 votes
0 answers
9 views

Appkit & Cocoa - How to support editing for a view-based NSTableView? [duplicate]

So I have a view-based NSTableView whose contents are stored in an NSMutableArray. Basically I created a table view in the storyboard and inserted a control of type "Image and Text Table CellView&...
IRP_HANDLER's user avatar
1 vote
1 answer
44 views

Cocoa - Block implicitly retains 'self' - Different solutions

So I have this snippet here which involves a block: NSArray<Class> *acceptableClasses = @[[DesktopEntity class]]; __block NSInteger insertIdx = row; [info ...
IRP_HANDLER's user avatar
0 votes
1 answer
55 views

Can't change the font size of an NSTableView

I'm following this code here where I have an NSTableView that displays the folder name as a group header and then the contents of the folder below, for this example these are all images. So like, ...
IRP_HANDLER's user avatar
-3 votes
0 answers
50 views

How did developers implement Auto Layout in the old days?

These days, we implement Auto Layout using NSLayoutConstraint. However, this has been available only since iOS 6.0 and Mac OS X 10.7. Before iOS 6.0, layouts had to be adapted to resolutions like ...
Jinwoo Kim's user avatar
0 votes
1 answer
38 views

How can an application check if it has permission to control another application through AppleScript without blocking?

I'm writing an AppKit macOS application that will use AppleScript / Apple events to automate another application. I need to know ahead of time whether or not my app has permission to do this for the ...
Bri Bri's user avatar
  • 2,120
0 votes
1 answer
37 views

NSWindow with SwiftUI content has zero frame on macOS 15

As title says. I create a window as such: onboardWindow?.setFrame(.init(x: 0, y: 0, width: 600, height: 400), display: false) Then, when it's time to show: let contentView = WelcomeView() let ...
Vojta Böhm's user avatar
0 votes
1 answer
35 views

Cocoa App trying to display document icon despite not being document based

I'm working on a Cocoa/AppKit Mac app, and after customizing the File menu items (save and new), I now get a blank document icon on my app. My app is not document based however, so it simply displays ...
zap.zip's user avatar
0 votes
0 answers
23 views

Xcode downloads client crash report but the stacktraces don't contain any of my app's symbols

All the threads only contain system calls. The crashed thread only contains a single call to my app's code which is main.swift:12. What could cause such a crash? Process: MyApp [83642] ...
Nickkk's user avatar
  • 2,626
0 votes
0 answers
70 views

Can't get NSTrackingArea enabledDuringMouseDrag to work

I'm trying to implement a right-click-and-drag operation to link two NSViews, in a very similar manner to creating constraints in the Xcode Interface Builder. I want the target NSView to respond to ...
Gannet's user avatar
  • 1,443
0 votes
0 answers
11 views

NSTitlebarAccessoryViewController State Restoration Timing

I am using NSTitlebarAccessoryViewController objects in my Cocoa app. I have implemented state restoration for the NSWindow and it appears to be working correctly as previous NSWindow objects along ...
user10711707's user avatar
0 votes
0 answers
22 views

Crash in AVPlayerView.setPlaybackControlsViewController

A user of my app, which shows subtitles loaded from a text file on top of a video loaded from another file, reported that it crashes within minutes of launching it. The user confirmed that the crash ...
Nickkk's user avatar
  • 2,626
0 votes
1 answer
49 views

How to properly replace NSTextView's string when used with bindings

I have issues with string replacement when there are newlines. How to properly replace string or part of a string so that bindings are triggered. I have used open func replaceCharacters(in range: ...
Marek H's user avatar
  • 5,546
0 votes
0 answers
26 views

NSPageController to navigate in vertical direction

I am working MacOS application which has a menu on the left and panels on the right switches back and forth as we select a menu. I would like to achieve the panel switching logic with NSPageController....
Kyung Lee's user avatar
-1 votes
1 answer
105 views

How to get macOS wallpaper image URL which respects the current color scheme?

I am looking to get the URL of the current wallpaper image on macOS, which also takes the current color scheme into consideration when using wallpapers with a different appearance based on the active ...
Kushagra's user avatar
  • 946

15 30 50 per page
1
2 3 4 5
57