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

NSTableView: selecting non-editable CELLS and not ROWS

I've tried numerous combinations of suggested options from other posts, but I can't seem to get a cell-bassed NSTableView populated with non-editable NSTextFieldCell to select the CELL and not the row. I've tried: [[col dataCell]…
SMGreenfield
  • 1,680
  • 19
  • 35
0
votes
2 answers

Interpolating gradient colors (as with NSGradient) on iOS?

AppKit is not available in iOS, so I was looking for a replacement. Specifically, I was looking for a replacement method for: - (NSColor *)interpolatedColorAtLocation: (CGFloat)location I need a way to define a gradient, and lookup a colour value…
Rahul Iyer
  • 19,924
  • 21
  • 96
  • 190
0
votes
1 answer

What is "index" in NSGradient getColor:location:atIndex?

In the following NSGradient method: - (void)getColor:(NSColor **)color location:(CGFloat *)location atIndex:(NSInteger)index What is index? The documentation says index of the colour I want. But I thought the point of this method is that it tells…
Rahul Iyer
  • 19,924
  • 21
  • 96
  • 190
0
votes
1 answer

-[NSView setFrame:] crashs due to invalid constraints

I have the typical MVC paradigm: an NSViewController that controls an NSTableView. If the table view is empt, the controller needs to display an image in the middle of the table view. Obviously, this image needs to stay in the middle of its…
lbrndnr
  • 3,361
  • 2
  • 24
  • 34
0
votes
1 answer

Proper way to label an NSAnimation for sorting animationDidEnd: messages

My question is pretty straightforward : I have a class which is the delegate of several NSAnimations and I will need to give a name/identifier to my NSAnimation so that the sorting of all the -(void)animationDidEnd:(NSAnimation *)animation messages…
Bertrand Caron
  • 2,525
  • 2
  • 22
  • 49
0
votes
1 answer

drawBackgroundInRect not called in layer backed view

I have an NSScrollView which is set to be layer backed by clicking the layer checkmark on the scrollview in IB. Within that scrollview I have an NSTableView. In that NSTableView I use a custom NSTableRowView to draw a vertical red line at the…
Tap Forms
  • 912
  • 8
  • 16
0
votes
1 answer

Closing a document's window and opening a new one, without closing the document

My app is document-based, but the “document” consists of two folders, not one file. The document's initial window contains a couple of file pickers and a button; the action closes that window and opens a new one showing the results of the operation…
Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
0
votes
2 answers

- [NSBundle pathForResource:ofType] works differently for directories on 10.7 and 10.8

I had this code NSString *path = @"foo/bar"; // Note this is a directory, not a file! NSString *pathInBundle = [[NSBundle mainBundle] pathForResource:path ofType:nil]; It was working fine on 10.8 (returning the path found in the bundle) but…
StuFF mc
  • 4,137
  • 2
  • 33
  • 32
0
votes
1 answer

NSTextFields Positioned Lower On Other Macs

This is a weird situation. In Xcode's IB, I have a NSTableCellView subclass that I've built. It looks like this: And when I run the app on my Mac, it comes out exactly as I would expect: However, if any other Mac runs my app, every text field…
Aaron Vegh
  • 5,217
  • 7
  • 48
  • 75
0
votes
0 answers

Draw under NSSlider

I have problem with drawing custom NSSlider. I have NSView with some subviews (including NSSlider). I setup order of subviews in nib file, but, when my view is presented on screen, all subviews drawn above NSSlider. This is wrong drawing ordering,…
Lexandr
  • 679
  • 1
  • 6
  • 22
0
votes
1 answer

Handle CMD+ in an NSView

I'm trying to trap the CMD+ and CMD- keyboard actions in my NSView - to increase and decrease the font size of some custom text. For various reasons, I can't simply use an NSTextView. Does anyone know the correct way to handle this? As I understand…
Scotty
  • 2,019
  • 1
  • 20
  • 31
0
votes
2 answers

NSView invisible unless I override drawRect, and then it gets clipped even if setMasksToBounds is NO on superview's layer

Trying to add a NSView to an existing NSView, but I'm failing miserably for some strange reason. I'm doing this: _resizeView = [[NSView alloc] initWithFrame:NSMakeRect(0, 0, 10, 10)]; [_resizeView.layer setBorderWidth:2]; …
Christian A. Strømmen
  • 3,181
  • 2
  • 25
  • 46
0
votes
1 answer

Creating Round NSButtons for insertion into NSToolbar

For a personal project, I'm currently trying to replicate the visual stylings of the toolbar in Automator for OS X. I have tried just about everything to get my NSButtons inside of the NSToolbar to look visually similar, but can't seem to figure out…
coryb
  • 238
  • 3
  • 14
0
votes
1 answer

drawLayer:inContext: draws background over content when using Layer-Hosting NSView

This is causing me some pain... I wish to use layer-hosting views in my app and I'm having this weird problem. Here is a simple example. Simply implemented by creating a new project in Xcode and entering the following in the AddDelegate: (after…
rboisjoly
  • 95
  • 1
  • 8
0
votes
2 answers

Xcode: setTitle not working

In my AppDelegate method applicationDidFinishLaunching: // Initialize here NSLog(@"Application finished launching..."); MyMain* mainAccess; // To send messages to SAAMain mainAccess = [[Main alloc] init]; NSLog(@"Setting…
user1234
  • 689
  • 1
  • 8
  • 22