Questions tagged [nsdocktile]

The NSDockTile class lets you customize the visual representation for your application’s miniaturized windows and application icon as they appear in the Dock. You do not create Dock tile objects explicitly in your application. Instead, you retrieve the Dock tile for an existing window or for the application by calling that object’s dockTile method.

18 questions
27
votes
3 answers

How do I draw a badge on my Dock icon using Cocoa?

How do I add a badge to the Dock icon for my app using Cocoa? Is there any roughly "standardized" way to do this? (I'm referring to the kind of badges that show up in Mail, iChat etc. to indicate the number of unread messages and the like.) Cocoa…
Debajit
  • 46,327
  • 33
  • 91
  • 100
9
votes
2 answers

Adding an NSProgressIndicator to the dock icon

I'm creating an application which should show a progress bar in the dock icon. Currently I have this, but it's not working: NSProgressIndicator *progressIndicator = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(0.0f, 0.0f, 10.0f, 20.0f)]; …
user142019
5
votes
5 answers

Finder file icon badging (icon overlay) on Mac OS X >= 10.6

I'm searching for a solution to do File icon overlays (icon badging) (like Dropbox does it on mac) with cocoa on Mac. Does anyone knows a way to do this? I've searched the Xcode docs and looked into scpplugins source code which is kind of old carbon…
Jonas Schnelli
  • 9,965
  • 3
  • 48
  • 60
4
votes
1 answer

Get Application badge of running applications

I'm not sure if this is possible, but I want to get the application badges of other running applications. So I'd like to get the text from Mail's badge or other apps like Adium. I've looked in NSWorkspace and NSRunningApplication and was not able…
Brian
  • 3,571
  • 7
  • 44
  • 70
3
votes
1 answer

How to create a customized dock menu for my macOS application in the dock using Xcode

I am trying to create a customized dock menu for my swift application in the dock so that when the user right click on the dock tile of my app after it has been launched, it will show my customized item in addition to the default dock menu items. I…
Kenny
  • 429
  • 6
  • 22
3
votes
2 answers

How to set badge notification for Qt on Mac

I want to set badge (notification number) on mac application using Qt, I also try QApplication::setWindowIcon() but it's only change the icon on window and dialog, not the icon on dock. Is there anyway to set badge using Qt ? Can I call cocoa…
Tran Quan
  • 1,056
  • 15
  • 28
2
votes
1 answer

Using layer backed NSView as NSDockTile contentView

Is there a way to use layer backed NSView as the contentView of a NSDockTile? Tried all sorts of tricks, but all I get is transparent area. Also tried going different route and get an image out of the CALayer and use that for [NSApp…
Tom
  • 1,522
  • 9
  • 10
2
votes
1 answer

How can I get the screen position of the DockTile in OSX?

I need a window to 'point' to the icon that was clicked on in the dock, similar to the way the context menu has the little callout-arrow pointing to it. This means I need to get the screen location of the dock, or more accurately the DockTile. …
Mark A. Donohoe
  • 28,442
  • 25
  • 137
  • 286
2
votes
1 answer

Swift - How can I get another application's NSDockTile object in Swift?

How can I get another application's NSDockTile object in Swift? My thoughts were I could get an array of NSRunningApplications and access the NSDockTile from there but I can only get the NSDockTile from NSApplication. So I guess another, better…
2
votes
3 answers

How to create a binding for NSApp.dockTile's

In IB it is easy to bind a label or text field to some controller's keyPath. The NSDockTile (available via [[NSApp dockTile] setBadgeLabel:@"123"]) doesn't appear in IB, and I cannot figure out how to programmatically bind its "badgeLabel" property…
Dr Nic
  • 2,072
  • 1
  • 15
  • 19
2
votes
2 answers

Dock Tile Plug-in not working

I'm trying to create a dock tile plugin. I've added a new Target to my project with Wrapper Extension as docktileplugin I've added a Class that implements NSDockTilePlugIn with method: -(void)setDockTile:(NSDockTile *)dockTile { NSLog(@"DOCK…
gravityab
  • 21
  • 4
1
vote
1 answer

Load app icon from xcassets on OS X

I can't load another app icon into NSImage. I tried to use both asset name and name of the particular file but image is always nil. let image = NSImage(named: "Alerted") //let alertedDog = NSImage(named: "Alerted128x128.png") image?.size =…
Shmidt
  • 16,436
  • 18
  • 88
  • 136
1
vote
0 answers

Change color for setBadgelabel Node Webkit

I am currently trying to make a chat desktop application using nodeJS, angularJs, and nodewebkit. For notifying the user, in the icon in the taskbar, I used setBadgelabel(). How can I change the color of the default badge label by the function…
Amala James
  • 1,336
  • 3
  • 16
  • 32
1
vote
2 answers

How to show a badge on an NSView (Mac OS X)

To add a badge to your application in the dock is easy, you just call [NSDockTile setBadgeLabel]. But I want to add a badge to a generic NSView. Is there any way to do this? Or failing that, how do you go about drawing one so that it looks…
Mark Ingram
  • 71,849
  • 51
  • 176
  • 230
1
vote
1 answer

Adding a number to the dock icon

Here is my code: for (NSManagedObject *object in array) { if ([[object valueForKey:@"DueDate"] isLessThan:[NSDate date]]) { count++; NSLog(@"Looped"); NSString *test = [[NSString alloc] initWithFormat:@"%@", [object…
nanochrome
  • 707
  • 2
  • 12
  • 26
1
2