osx

How close are Mac OS X and BSD related?

I read that Mac OS X and bsd are related. How close are they related. Can Mac OS X software be tweaked and installed on BSD? ...

Have I used uniform type identifiers correctly?

I'm creating an application for Mac OS X, and I wanted to know whether I've used UTIs properly in the application's .plist file: <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeIdentifier</key> <string>com.petroules.silverlock.database</string> <key>UTTypeDescription</key> <string>Silv...

OS X Safari automatically convert selection to contact

I am relatively new to OS X. Is there a downloadable app or service which will allow me to select some text (address, phone number) from a web page or other text and automatically create a new contact in the address book? Thanks. ...

iTunes Application Loader - automation

Since recently Apple changed the iTunes Connect interface, and people are required to upload apps with the Application Loader. That's nice but I need a script for automating my work. How can an app like App Loader be automated? I was thinking of something written in AppleScript ... but I don't know what actions it exposes (if any). Fo...

Opening files from Finder with a Qt-based application?

Apparently, for Cocoa applications, you're supposed to implement [[NSApp delegate] application:openFile:] or something like that to allow your application to open files double clicked in Finder. How do you achieve this functionality using Qt, as the name of the file to be opened is not passed on the command line? ...

Control iTunes from a cocoa application

I am developing a mac application that involves audio playback. I would like to pause other audio players when our playback starts. how can I 1) detect that itunes is running 2) detect that itunes is currently playing 3) pause itunes 4) resume itunes when I am done also: 5) Is the a way to pause other types of media playback as well? ...

Compilation warning with Qt - Mac OS X only: <class> is already a friend of <class>

I am receiving the following warning when compiling a Qt project, but ONLY on Mac OS X with GCC. Windows with MinGW and Linux with GCC do not emit this warning. /Library/Frameworks/QtCore.framework/Versions/4/Headers/qtextcodec.h:175: warning: 'QCoreXmlStreamWriter' is already a friend of 'QTextEncoder' Why is this showing up and how c...

Why did POCO chose to use Posix semaphores for OSX?

I am a new bee to MAC/OSX. I am working on Titanium a cross platform runtime, which uses POCO library for most of the portable C++ API. I see that POCO uses POSIX semaphore for its NamedMutex implementation on OSX as opposed to SysV semaphore that it is using for few other *NIX. bool NamedMutexImpl::tryLockImpl() { #if defined(sun) || ...

macdeployqt not copying plugins

I'm developing a Qt-based application and when I use macdeployqt on the bundle, the Qt plugins are not copied to the bundle. However, if I run it a second time, they are. Additionally, "The svg icon plugin is deployed if the application uses the QtSvg module." is not fullfilled - my application does use QtSvg but the iconengines/* plugi...

Sort lines by length with automator?

I have a text document (1MB, TXT file) with a little more than 17,500 lines. What I'm hoping to be able to do is to sort those lines by character length and have it output to either the same file (which is then saved) or a new file entirely. Either one works fine as long as I know ahead of time. Bonus points if I could do it through Aut...

Mac OS X document icon template?

Is there a template available for the Mac OS X document icon? It looks like a white piece of paper with the top right corner curled down. Lots of applications seem to use this icon as a base for their own custom document types. Does everyone use a template for the basic shape, or does every developer have to draw their own from scratch? ...

Application updates in Mac OS X

To provide application updates in Windows, we can simply download the installer and run it. Applications are installed in %PROGRAMFILES% and shortcuts are placed in various places. Keys and values are added to the registry to provide an entry in the system's Programs list. To provide application updates in Linux, we can use the system's...

What's the difference between using a LaunchAgent and checking "Open at Login" in Dock? And how do I access the latter programmatically?

What's the difference between using a LaunchAgent and checking "Open at Login" in Dock? And how do I access the latter programmatically? ...

Headers in 3rd party frameworks on Mac OS X

I'm using the Sparkle framework in Qt. I've added the following to my .pro file: LIBS += -framework Sparkle QMAKE_CXX_FLAGS += -F/path/to/the/directory/sparkle.framework/is/in However I get a compilation error saying "Sparkle/Sparkle.h" cannot be found. Framework headers physically reside in MyFramework.framework/Headers/*.h and are i...

How can i receive Notifications while a modal dialog is open.

I need to send messages to the GUI thread which should be processed the next time the GUI thread is idle. This message can come from the GUI thread or background threads. I tried a combination of a MachPort/Notification. But when i do a [[NSNotificationQueue defaultQueue] enqueueNotification: my_notify postingStyle: NSPostASAP]; Thi...

Evt.TickCount() not found with Python2.6 on OSX 10.6.3

With Python2.6, the Evt module (from Carbon import Evt) does not have seem to respond to TickCount() on OSX. But Python2.5 is fine: from Carbon import Evt s = Evt.TickCount() On Python2.5 I get a returned integer. On Python2.6 I get: AttributeError: 'module' object has no attribute 'TickCount' This is on Snow Leopard. Is there some...

Access Cocoa and/or Carbon to automatically start on boot on OS X (on C++ also using QT)

I have a C++ application using the QT framework. I'm trying to add an option for the user to be able to set the program to start automatically on startup. My development machine is running OS X 10.6. As my main Mac reference, I'm using this Apple documentation. According to the documentation, there are two recommended ways of doing thi...

How to auto-crop a CIImage?

I've got a CIImage with an alpha channel. Big portions of it are fully transparent. I'd like to find the minimal axis-aligned bounding box containing the full nonzero-alpha region, and crop the image to this bounding box. Similar to the "auto-crop" feature in GIMP. How should I proceed? ...

showkey equivalent on mac os x?

I'm debugging an emacs keyboard binding on my mac (C-/ to undo, if you're curious), and I came across a suggestion on EmacsWiki that I could use "showkey" to find the scancode. But it looks like a GNU/Linux-only kinda thing. Didn't find it on MacPorts. Anyone know of an alternative or something I'm missing? ...

Ruby on Mac OSX via Mac Ports

I'm new to both Ruby and to Mac OSX, though I do have a fair amount of experience with Unix commands. I just installed Ruby 1.9 via a MacPorts command (port install ruby19). I then needed to do a find from root just to figure out where it went, which turned out to be: /opt/local/var/macports/software/ruby19/1.9.1-p376_0/opt/local/bin/rub...