dock

Getting the position of my application's dock icon using Cocoa's Accessibility API

折月煮酒 提交于 2019-12-04 08:42:10
How can I get the position of my application's dock icon using the Accessibility API? Found it! Using this forum post as reference, I was able to shape the given sample code to what I needed: - (NSArray *)subelementsFromElement:(AXUIElementRef)element forAttribute:(NSString *)attribute { NSArray *subElements = nil; CFIndex count = 0; AXError result; result = AXUIElementGetAttributeValueCount(element, (CFStringRef)attribute, &count); if (result != kAXErrorSuccess) return nil; result = AXUIElementCopyAttributeValues(element, (CFStringRef)attribute, 0, count, (CFArrayRef *)&subElements); if

How do I test my Dock Application

烈酒焚心 提交于 2019-12-04 08:11:20
问题 I don't have a Dock, but I'm writing an Dock replacement app. Can I simulate the Clock Dock somehow? I know I can for the Car Dock, but that's not the dock I'm replacing. Can I flip my device to Desk Mode through ADB somehow? Maybe with something like? ADB shell sendevent XXX Thanks 回答1: The adb command above is almost correct. you need to use --ei and not -ei. the full command I use to simulate docked to car is: am broadcast -a android.intent.action.DOCK_EVENT --ei android.intent.extra.DOCK

Adding an NSProgressIndicator to the dock icon

徘徊边缘 提交于 2019-12-03 12:51:07
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)]; [progressIndicator setStyle:NSProgressIndicatorBarStyle]; [progressIndicator setIndeterminate:NO]; [[[[NSApplication sharedApplication] dockTile] contentView] addSubview:progressIndicator]; [progressIndicator release]; Or must I draw it on the dock myself? Can anyone help me? Thanks. In the finish I had to use the following code as the contentView was

Debugging an iOS app with an external accessory connected via Dock

↘锁芯ラ 提交于 2019-12-03 04:46:26
问题 Am I missing something glaringly obvious or is there no way to debug an iOS app which uses an external accessory that's connected via the 30-pin dock without using a bucket load of logs etc. I want to be able to use things such as breakpoints and Instruments. Is there a way to remote debug perhaps, over Wi-Fi, Bluetooth? Note: Yes, I asked this very recently and I deleted it because I thought I found the answer.. but the answer was only Instruments has support over Wi-Fi.. not Xcode debugging

Drag messages from Mail onto Dock using Swift

这一生的挚爱 提交于 2019-12-03 03:47:06
I am trying to get my application to accept a mail message that was dropped onto my application's dock icon directly from Mail. I have followed this link Dropping Files onto Dock Icon in Cocoa and tried to convert in into Swift and the latest version of Xcode but with no joy. This is my AppDelegate.Swift file: import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func application(sender: NSApplication, openFile filename: String) -> Bool { println(filename) return true } func application(sender: NSApplication, openFiles filenames: [String]) { println(filenames) }

Stop Java Coffee Cup icon from appearing in the Dock on Mac OSX

烈酒焚心 提交于 2019-12-03 01:28:26
问题 After upgrading to OSX 10.8.4, background Java processes started placing a Java Cup icon in the Dock. It causes the currently active window to loose focus which is very annoying when running some script that forks many short running Java processes (headless). The file menu (top of the screen next to the apple symbol will show the name of the class file that Java is running, e.g. org.apache.hadoop.util.RunJar). Since I'm not explicitly launching these Java commands, I've tried putting alias

Recommendations for a docking library for Delphi / C++Builder?

拜拜、爱过 提交于 2019-12-03 01:09:56
问题 My team is currently thinking of moving our existing MDI-based application to a more modern, docking-based approach. We're still thinking, but we'd like to move it to something like VS2010's docking and visual look: This has the following features: Shows a blended outline where the window will dock Docks into tabs, as well as side-by-side Allows docking by dragging and releasing over an image showing the dock position (I call this a 'docking widget' below) Looks pretty good too (theme / UI

How do I test my Dock Application

我是研究僧i 提交于 2019-12-02 21:21:53
I don't have a Dock, but I'm writing an Dock replacement app. Can I simulate the Clock Dock somehow? I know I can for the Car Dock, but that's not the dock I'm replacing. Can I flip my device to Desk Mode through ADB somehow? Maybe with something like? ADB shell sendevent XXX Thanks The adb command above is almost correct. you need to use --ei and not -ei. the full command I use to simulate docked to car is: am broadcast -a android.intent.action.DOCK_EVENT --ei android.intent.extra.DOCK_STATE 2 execute this command from the adb console and that should do it (no permission issues since adb runs

Debugging an iOS app with an external accessory connected via Dock

Deadly 提交于 2019-12-02 17:59:40
Am I missing something glaringly obvious or is there no way to debug an iOS app which uses an external accessory that's connected via the 30-pin dock without using a bucket load of logs etc. I want to be able to use things such as breakpoints and Instruments. Is there a way to remote debug perhaps, over Wi-Fi, Bluetooth? Note: Yes, I asked this very recently and I deleted it because I thought I found the answer.. but the answer was only Instruments has support over Wi-Fi.. not Xcode debugging. So the question still remains... And so...: Given that I've had no real luck finding the answer, and

Stop Java Coffee Cup icon from appearing in the Dock on Mac OSX

牧云@^-^@ 提交于 2019-12-02 14:50:41
After upgrading to OSX 10.8.4, background Java processes started placing a Java Cup icon in the Dock. It causes the currently active window to loose focus which is very annoying when running some script that forks many short running Java processes (headless). The file menu (top of the screen next to the apple symbol will show the name of the class file that Java is running, e.g. org.apache.hadoop.util.RunJar). Since I'm not explicitly launching these Java commands, I've tried putting alias java="java -Djava.awt.headless=true" in .profile but this doesn't seem to help. Has anyone run into this