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

Appending *simple* ASCII strings to an NSScrollView

Is there a simple way to append a string to an NSScrollView's NSTextView? I don't want attributes. I simply have error messages coming in as NSString's, and I wish to append each to the window. Nothing fancy. No formatting beyond CR, LF and perhaps…
Dale Amon
  • 219
  • 2
  • 5
0
votes
1 answer

Close an NSWindow without activating the window below

Consider the following scenario. I have an app with two windows: the main window which contains all of the app's functionality; and an auxiliary window that can be invoked using a global shortcut or by clicking app's status bar icon. It looks like…
radex
  • 6,336
  • 4
  • 30
  • 39
0
votes
1 answer

How to create alert message in mac os x 10.2?

i need create one alert message in mac os x 10.2, but I can not use nsalert, According To nsalert since documentation is available from 10.3…
Heberth
  • 615
  • 6
  • 16
0
votes
1 answer

NSBitmapImageRep bug

This code produces some very strange output. Why? All I do is copying an image. NSData *data = [NSData dataWithContentsOfFile: @"/Users/Jojo/Desktop/k2.jpg"]; NSBitmapImageRep *image = [NSBitmapImageRep imageRepWithData:…
Atomix
  • 13,427
  • 9
  • 38
  • 46
0
votes
1 answer

How to detect last NSColorWell color selected in cocoa

Is there any way to detect last NSColorWell color selected? So far i have create NSColorWell with action and target programmatically, So how many time i changed the color that method is called that much time. So i want to identified last selected…
PR Singh
  • 653
  • 5
  • 15
0
votes
1 answer

Custom NSPopUpButtonCell drawImage:withFrame:inView not getting called

I have a custom NSPopUpButtonCell and I'm trying to override drawImage:withFrame:inView. Strangely, the drawImage method is never called, but the image appears on screen. What am I missing? I've checked to make sure my cell is properly installed --…
Ken
  • 206
  • 1
  • 10
0
votes
2 answers

Bindings AND target/action?

I currently have a color well which keeps track of a color that gets saved in the NSUserDefaults. It is bound to an NSUserDefaultsController. However, I also want to listen for changes to the color so I can update my views accordingly. Therefore, in…
chrisgoyal
  • 4,297
  • 4
  • 22
  • 27
0
votes
1 answer

Incompatible type for argument 1 of 'bezierPathWithOvalInRect' error

I have the following code: - (void)drawRect:(NSRect)dirtyRect { [[NSBezierPath bezierPathWithOvalInRect:[self theRect]] stroke]; } - (NSRect)theRect { return NSMakeRect(1, 1, 1, 1); // made up some values } When I compile it says…
chrisgoyal
  • 4,297
  • 4
  • 22
  • 27
0
votes
1 answer

What are default constants for NSLayoutConstraint?

In Xcode I can put some controls on the window's contentView and they get default spacing according to some unknown rules. This depends on control types that are constrained. For example, two NSButtons of regular type are separated by 12 points, but…
user3125367
  • 2,920
  • 1
  • 17
  • 17
0
votes
2 answers

Xcode completion doesn't recognize the type of my variable

I'm creating an object with: NSMenu *appMainMenu = [[NSMenu alloc] initWithTitle:@"MyApp"]; (Ignore the fact I'm creating this menu programmatically and not using a Nib File. I understand the disadvantages of doing so) The menu appears correctly…
wadesworld
  • 13,535
  • 14
  • 60
  • 93
0
votes
1 answer

Symbol not found _OBJC_IVAR_$_NSView._layer (in AppKit) only on 10.7, works fine on 10.8 and 10.9

My mac cocoa app works fine on 10.8 and 10.9 except on 10.7 (fresh install) with this error at start : Symbol not found: _OBJC_IVAR_$_NSView._layer Process: xxx [875] Path: …
Matt Oz
  • 31
  • 1
  • 4
0
votes
1 answer

No module named Appkit?

I have heard that appkit is included with PyObjC, so I installed with $ sudo pip install pyobjc-core $ sudo pip install pyobjc And now when I go into Python: >>> from AppKit import NSSpeechSynthesizer Traceback (most recent call last): File…
user3151828
  • 363
  • 1
  • 7
  • 21
0
votes
1 answer

How to add stoplight buttons to an OS X application programmatically

I'm building an OS X cocoa application and I'm not using interface builder (for a variety of reasons). I've got the application to the point of loading a menu, title bar and main window, but I can't seem to figure out how to add the stoplight…
marpaia
  • 39
  • 5
0
votes
1 answer

NSTableView won't layout / resize columns until NSWindow manually resized

I've an NSTableView with several NSTableColumn objects that appear to have all the correct auto-resizing flags set. However, every time I rebuild the table's contents, the columns all return to a narrow size -- unless I click and manually resize…
SMGreenfield
  • 1,680
  • 19
  • 35
0
votes
3 answers

How does NSViewController avoid bindings memory leak? [have sample app]

I'm trying to implement my own version of NSViewController (for backwards compatibility), and I've hit a problem with bindings: Since bindings retain their target, I have a retain circle whenever I bind through File's owner. So I thought I'd just…
uliwitness
  • 8,532
  • 36
  • 58