Questions tagged [appkit]

The Application Kit is a collection of classes provided by OpenStep operating systems such as OPENSTEP, GNUstep, and Mac OS X.

The Application Kit is a collection of classes provided by OpenStep operating systems such as OPENSTEP, GNUstep, and Mac OS X.

Apple's reference documentation describes AppKit as follows:

AppKit contains all the objects you need to implement the user interface for a macOS app—windows, panels, buttons, menus, scrollers, and text fields—and it handles all the details for you as it efficiently draws on the screen, communicates with hardware devices and screen buffers, clears areas of the screen before drawing, and clips views.

Reference

1436 questions
0
votes
1 answer

Loading order of top level objects in nib

Is the loading order of top level objects in a nib file random or can it be determined? I thought it would load the objects in the order I put them in in Interface Builder. But that doesn't seem to always be the case. I wanted to create an inspector…
DrummerB
  • 39,814
  • 12
  • 105
  • 142
0
votes
2 answers

List of kAB*** properties?

The AddressBook framework has a list of constants, like kABFirstNameProperty. I'm wondering if there's a list of those that I could display in a user interface, other than having to "replicate" this myself?
StuFF mc
  • 4,137
  • 2
  • 33
  • 32
0
votes
1 answer

Cut & paste of files with NSPasteboard

How are we supposed to cut & paste files using NSPasteboard? Currently I implemented copy and paste by writing and reading file URLs. The problem with cut is, that after I wrote the URL to the pasteboard, I have to remove the file. And when I try to…
DrummerB
  • 39,814
  • 12
  • 105
  • 142
0
votes
1 answer

NSControl subclass shouldn't change firstResponder

I implemented a tabbar view as an NSControl subclass. When I click it, AppKit will try to update the firstResponder of my NSWindow. Because I don't want the tabbar to become firstResponder (acceptsFirstResponder returns NO) the NSWindow itself will…
DrummerB
  • 39,814
  • 12
  • 105
  • 142
0
votes
1 answer

What is The Mac equivalent of iOS's CALayer "willMoveToSuperview"?

I see this called ALL THE TIME on iOS, and it makes it very hard to port some of the cool Core Abimation stuff out there to the Mac, cause I can't figure out what the following is for... -(void)willMoveToSuperview:(UIView *)newSuperview { TwUI…
Alex Gray
  • 16,007
  • 9
  • 96
  • 118
-1
votes
0 answers

How to restore simple click-and-drag multi-selection in a standard sidebar (NSOutlineView based)?

I want the default behavior (no d&d) without needing a modifier key. But changing the selectionHighlightStyle to NSTableViewSelectionHighlightStyleSourceList or using the view in an NSSplitViewItem sidebar alters this behavior, requiring an…
Yansen13
  • 9
  • 2
-1
votes
1 answer

AppKit Reading Keyboard Input in Separate Thread

Is there anyway to read keyboard inputs in AppKit off the main thread? I've managed to do so using CGEventTapCreate but unfortunately it requires permissions I'd rather not have to request. Is there a way to read local inputs off the main…
loats
  • 1
  • 1
-1
votes
0 answers

Custom find-bar view in NSScrollView

Is there a way to insert a custom Find bar in NSScrollView, so that it plugs in properly with the find-system of Cocoa. I did some digging around NSTextFinder, NSTextFinderClient and NSTextFinderClient. Seems like they facilitate various search…
Kaunteya
  • 3,107
  • 1
  • 35
  • 66
-1
votes
0 answers

Override readonly property in Swift

I'm trying to implement my own run() method of the NSApplication NSApplication class has isRunning readonly property: var isRunning: Bool { get } This property should be true when run is called. Apple documentation says: The value of this property…
Andrii
  • 9
  • 2
-1
votes
1 answer

How to use custom fonts in a Mac OS quicklook extension?

I need to use a custom font in a QuickLook extension. In the main application where the extension is embedded, I already use this font without problems. So I tried to use the key ATSApplicationFontsPath in the Info.plist as well, but that doesn't…
D. Mika
  • 2,577
  • 1
  • 13
  • 29
-1
votes
1 answer

Has the behavior of copyItemAtPath changed under Ventura? Returning "file doesn't exist"

My app creates a working file in the Application Support folder at launch, and subsequently saves that file in a user preferred folder (specified in preferences as a path). The save code is very simple: - (void) saveFile: (NSString *) path { …
johnpurlia
  • 113
  • 6
-1
votes
1 answer

AppKit's `NSWorkspace.activeApplication()` returns `None` when run by cron

So I'm trying to keep track of application usage by grabbing the active window at regular intervals. My goal is to have daily/weekly data of what applications were used, and for [roughly] how long. The active-window-name grabbing happens thanks to…
Adam Smooch
  • 1,167
  • 1
  • 12
  • 27
-1
votes
1 answer

NSTextView – text disappears while adding a new line

I've recently met a problem that once I'm adding a new line in an NSTextView, the least visible line disappears for a moment. The same happens when I'm deleting a line. The problem occurs even in a newly created Xcode project with pure NSTextView.…
-1
votes
1 answer

MultipeerConnectivity can't invite peer

I am trying to make an ios app and an osx app communicate between each other. Everything is good until the "invite peer" part. I got the errors bellow: 2022-07-18 17:45:10.066594+0800 iRemoteMac[42755:5561655] [connection]…
Fake Panda
  • 35
  • 2
-1
votes
1 answer

How to get key code or key text from an NSEvent in AppleScript with AppKit

I would like to be able to get either the key code or the characters/text from an NSEvent/KeyEvent. Absolutely no idea how to do this as the documentation I have found so far has been very limited. My script is below. I am working on a speedrun…