Tag: osx lion
Trouble creating Security-Scoped Bookmark
I’m converting my Lion app to use the App Sandbox. I’m trying to make use of the security-scoped bookmarks feature introduced in 10.7.3 to allow persistent access to a folder. The code I have below returns a nil bookmark, and produces the following log message: XPC couldn’t look up the Mach service for scoped bookmarks […]
How do I add Objective C code to a FireBreath Project?
I am writing a browser plugin for Mac OS that will place a status bar icon in the status bar, which users can use to interface with the browser plugin. I’ve successfully built a FireBreath 1.6 project in XCode 4.4.1, and can install it in the browser. However, FireBreath uses C++, whereas a large majority […]
NSTextField not calling delegate when inside an NSTableCellView
I have a fairly vanilla Source List (dragged out from the Object Library) in my app, with an NSTreeController as its data source. I set the NSTextField inside the DataCell to be editable, but I want to be able to turn that off for some cells. The way I figured you would do this, is […]
Change selection color on view-based NSTableView
Standard highlighting color in OS X applications is blue. Is it possible to change it to another color, e.g. gray? Note that I am using the new view-based NSTableView available starting from OS X 10.7.
App Sandbox: document-scoped bookmark not resolving; not returning any error
I’m sandboxing my app, and trying to allow for import/export of multiple files, using an XML file to refer to them. To allow my app (or another sandboxed app) access to the files listed in the XML, I’m also including a serialized security-scoped bookmark. I’m serializing it as described in this answer, and my unit […]
“Data Model Version Compile”.. error after upgrading to Lion (Xcode4.1)
Since upgrading to Lion yesterday (10.6->10.7), I’ve been unable to compile a project that had no problems compiling prior to the upgrade. It’s not even a recent change to the project that’s causing this error: If I checkout from SVN a version of the project from a few days or a week ago, I get […]
Writing a privileged helper tool with SMJobBless()
Even though the API has been open since Mac OS X Leopard, there’s surprisingly, and unfortunately, very little documentation on how to correctly use SMJobBless() for creating privileged helper tools. There are a lot of gotchas, even when copying code directly from Apple’s sample project. Luckily, I’ve found my way around this, and have gotten […]
View-based NSTableView with rows that have dynamic heights
I have an application with a view-based NSTableView in it. Inside this table view, I have rows that have cells that have content consisting of a multi-row NSTextField with word-wrap enabled. Depending on the textual content of the NSTextField, the size of the rows needed to display the cell will vary. I know that I […]
Xcode 4 menu “Build” and “Clean” options disabled
I have a few c++ Xcode 3 projects which I need to move to Xcode 4. I have done this by simply renaming the Xcode 3 folder, loading the Xcode 3 project in Xcode 4 and then hitting the modernize button. In the case of some of these projects I cannot build them because the […]
SystemConfiguration/SystemConfiguration.h file not found
I am getting the following error in the file Reachability.h. I have the required framework. What else do I need to do? This is an app made in Xcode3 and I am trying to import in Xcode4.