Re: A Quick Look contribution and a question

2011-01-04 Thread Julien Jalon
Look at Apple provided code sample at: http://developer.apple.com/library/mac/samplecode/QuickLookDownloader/Introduction/Intro.html -- Julien Jalon On Monday, January 3, 2011, Brad Stone wrote: > I'm submitting this code for anyone who needs a quick hack to get Quick Look > working.  It's a

Re: Application that uninstalls itself

2011-01-04 Thread Macdev
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com

Re: When adding Cocoa classes I get a lot of compile errors automatically

2011-01-04 Thread Scott Ribe
On Jan 3, 2011, at 2:51 PM, Jason T. Slack-Moehrle wrote: > If I try and just compile the .mm that is where the errors come from > referencing NSObjCRuntime.h and they are like: Sure looks like it's including Cocoa headers in a non Objective-C file. But that doesn't fit with your description of

Re: Application that uninstalls itself

2011-01-04 Thread James Bucanek
eveningnick eveningnick wrote (Monday, January 3, 2011 8:48 AM +0200): In any sane operating system it is impossible (at least, directly) for an application to remove a file that is running. Hence i am searching for a detour. Who said OS X / BSD had to sane? As

Re: Event to trigger writeSelectionToPasteboard

2011-01-04 Thread Peter Watkins
Hi Graham, Read the Services Implementation Guide: > > > http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/SysServices/introduction.html > > The app needs to be written to be services aware, and implement the > protocols specified in the guide. If not, you can't do what you'r

Re: Event to trigger writeSelectionToPasteboard

2011-01-04 Thread Peter Watkins
Hi Peter, You can copy a selection using the Accessibility API: > First get the UIElement for the application's "Copy" menu item. > Then invoke "AXPress" on it. > Drawback is that you will have to ask the user to enable Accessibility if > it is not enabled. > > To get an idea about Accessibility,

Re: Missing connection

2011-01-04 Thread Matt Neuburg
On Jan 3, 2011, at 8:35 PM, John Brownie wrote: > On Tue Jan 04 2011 13:56:58 GMT+1000 (PGT) Matt Neuburg wrote: > >> You don't have a method called setStickyModifiers:, do you? If so, it will >> be called at nib-loading time with the button instance as parameter. When an >> instance variable

Re: Event to trigger writeSelectionToPasteboard

2011-01-04 Thread Peter Watkins
Hi Mark, You used to be able to get around this stuff by using one of the > plugins available (AppleScript Addition or Contextual Menu). But it > seems with each new OS release, Apple has been isolating apps more and > more. No plugins, no way to directly perform common actions like > copy/paste o

Re: Application that uninstalls itself

2011-01-04 Thread eveningnick eveningnick
Thanks everyone for advices! 2011/1/4 James Bucanek : > In my application, I have a special "Uninstall and Quit" menu item. I > shutdown and delete launchd configuration files and them move the active > components (plug-ins, helpers, ...) to the trash. I find this avoid the > problem of deleting f

Close System Preferences programmatically

2011-01-04 Thread eveningnick eveningnick
Is it possible to close System Preferences programmatically from within a custom preference pane? What would be the correct way? Is it possible to programmatically press button "Show all"? Thanks ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) P

Re: Close System Preferences programmatically

2011-01-04 Thread Nick Zitzmann
On Jan 4, 2011, at 1:56 PM, eveningnick eveningnick wrote: > Is it possible to close System Preferences programmatically from > within a custom preference pane? Yes. > What would be the correct way? You could just call -[NSApplication terminate:], though I'm wondering why you'd want to progr

Re: Close System Preferences programmatically

2011-01-04 Thread eveningnick eveningnick
Hi Nick Thank you I've an unusual application that is mainly located in System Preferences (its gui part), and which can be uninstalled by clicking a button "Uninstall" in that prefpane better solution would be to programmatically press "Show All" button ("back" in System Preferences), but that se

Re: Close System Preferences programmatically

2011-01-04 Thread Kyle Sluder
On Tue, Jan 4, 2011 at 12:56 PM, eveningnick eveningnick wrote: > Is it possible to close System  Preferences programmatically from > within a custom preference pane? What would be the correct way? > Is it possible to programmatically press button "Show all"? You should never need to do either of

Re: Close System Preferences programmatically

2011-01-04 Thread Murat Konar
Since you can't reload bundles, you might need to quit System Preferences as part of a preference pane's self-updating scheme. But it's probably better to just ask the user to do it. _murat On Jan 4, 2011, at 1:08 PM, Nick Zitzmann wrote: > > On Jan 4, 2011, at 1:56 PM, eveningnick eveningnic

Re: Close System Preferences programmatically

2011-01-04 Thread John Joyce
On Jan 4, 2011, at 3:20 PM, eveningnick eveningnick wrote: > Hi Nick > Thank you > I've an unusual application that is mainly located in System > Preferences (its gui part), and which can be uninstalled by clicking a > button "Uninstall" in that prefpane > > better solution would be to programma

Re: Close System Preferences programmatically

2011-01-04 Thread Peter Lübke
Though almost everybody seems to disagree you should do something like this here some ideas: - If you want to press the "Show All"- or "Back"- button, you could do this using the Accessibility API; take a look at Apple's "Accessibility Inspector" app. - If you really want System Preferenc

Re: Close System Preferences programmatically

2011-01-04 Thread Dave DeLong
Another option would be to have your preference pane launch a little installer that won't proceed until the user quits System Preferences. Something like "In order to uninstall MyAwesomeFoo, please quit System Preferences". Then wait until the app quits, then dismiss the dialog and proceed. Y

Re: Close System Preferences programmatically

2011-01-04 Thread Dave DeLong
s/installer/uninstaller/ Dave On Jan 4, 2011, at 2:14 PM, Dave DeLong wrote: > Another option would be to have your preference pane launch a little > installer that won't proceed until the user quits System Preferences. > Something like "In order to uninstall MyAwesomeFoo, please quit System

Re: Close System Preferences programmatically

2011-01-04 Thread eveningnick eveningnick
> - If you really want System Preferences to quit, you could use NSAppleScript > and do something like: > tell application "System Preferences" to quit > You can do the same using AppleEvents. Peter, could you hint me on how to do it using AppleEvents? Googling, i have found some references to Om

Re: Event to trigger writeSelectionToPasteboard

2011-01-04 Thread Graham Cox
On 05/01/2011, at 3:04 AM, Peter Watkins wrote: > This is what I'm really trying to achieve, "I'm writing an app that lets the > user select text in one program and paste it into another by middle-clicking > the mouse button." But why? There is a perfectly reasonable standard way to cut and p

Re: Close System Preferences programmatically

2011-01-04 Thread Murat Konar
Leaving aside for the moment the wisdom of all this... Preference panes run in the same process as the System Preferences application. That means they can directly call methods of the objects that make up System Preferences. A simple way to get System Preferences to "Show All" is to simply call

Re: Close System Preferences programmatically

2011-01-04 Thread Kyle Sluder
2011/1/4 eveningnick eveningnick : >> - If you really want System Preferences to quit, you could use NSAppleScript >> and do something like: >> tell application "System Preferences" to quit >> You can do the same using AppleEvents. > > Peter, could you hint me on how to do it using AppleEvents? > >

Re: Close System Preferences programmatically

2011-01-04 Thread Peter Lübke
Am 04.01.2011 um 23:38 schrieb eveningnick eveningnick: - If you really want System Preferences to quit, you could use NSAppleScript and do something like: tell application "System Preferences" to quit You can do the same using AppleEvents. Peter, could you hint me on how to do it using App

NSBorderlessWindowMask & frontmost behaviour

2011-01-04 Thread Nicholas Francis
Hi there. In Unity, we are drawing our own window decorations (there's a lot of detachable tabs being dragged around), and I have an issue about which window goes to front when a user closes a borderless window. Essentially, Unity has 1 normal NSWindow (with titlebar, min/max buttons, etc). Us

Re: When adding Cocoa classes I get a lot of compile errors automatically

2011-01-04 Thread Jason S-M
>> >> If I try and just compile the .mm that is where the errors come from >> referencing NSObjCRuntime.h and they are like: > > Sure looks like it's including Cocoa headers in a non Objective-C file. But > that doesn't fit with your description of what you're doing, so I don't know. > > You s

Re: NSBorderlessWindowMask & frontmost behaviour

2011-01-04 Thread Seth Willits
On Jan 4, 2011, at 5:37 PM, Nicholas Francis wrote: > The problem comes when the user has created two AUX windows in addition to > the "main" one. When one AUX window is closed, the main window always gets > keyboard focus, even if the other aux window was is in front. I'm looking for > a way t

How to set focus on table view's editable cell on Enter key press

2011-01-04 Thread Abhijeet Singh
Hi,I have a table view in my application. Table view has 3 columns. Items (rows) in table view are added on Enter (return) key press on keyboard. Column no 2 is editable and user needs to fill it. What I want to achieve is when user press Enter key on key board:1. New row is added in table view