osx-lion

App Sandbox: document-scoped bookmark not resolving; not returning any error

帅比萌擦擦* 提交于 2019-11-28 10:49:41
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 tests (which are not sandboxed) write and read the XML data without issue. When my app resolves the bookmark, the NSURL returned is nil, as is the NSError reference. Since I don't believe that should be the case, why is it happening? I can work around it by prompting the user to

Linking troubles with boost::program_options on OSX using LLVM

╄→尐↘猪︶ㄣ 提交于 2019-11-28 10:11:37
I'm having trouble getting through the linking phase in my C++ program due to problems with Boost 1.49. I have switched to C++ ( -std=c++11 -libc=libc++ ) which works fine for another piece of code (which also uses boost). Boost was installed using homebrew with: brew install boost --universal --with-mpi --with-icu The trouble starts with boost::program_options . I get the link errors like this: "boost::program_options::validate(boost::any&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char,

How do I add Objective C code to a FireBreath Project?

戏子无情 提交于 2019-11-28 08:44:30
问题 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 of the existing libraries for Mac OS are written in Objective C. In the /Mac/projectDef.make file, I added the Cocoa Framework and Foundation Framework, as suggested here and in other

“Data Model Version Compile”.. error after upgrading to Lion (Xcode4.1)

此生再无相见时 提交于 2019-11-28 07:38:50
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 the same error whilst building: "Command /Developer/usr/bin/momc failed with exit code 6" , which expands to the following: Build Error: DataModelVersionCompile /Users/ian/Library/Developer/Xcode/DerivedData/inventory-gtvznzuhomhlakbdpocaqwnrihhx/Build/Products/Debug-iphonesimulator/inventory.app

Clang and the default compiler in OS X Lion

人走茶凉 提交于 2019-11-28 06:37:32
In OS X Snow Leopard (10.6) I used the following lines in ~/.bashrc to force compilation with clang instead of standard gcc: # Set Clang as the default compiler for the system export CC=clang export CFLAGS=-Qunused-arguments export CPPFLAGS=-Qunused-arguments I also (occasionally) had to use the following lines to use llvm-gcc when clang would fail to compile certain things (PostgreSQL was guilty of this for a long time): # Set LLVM GCC as the default compiler for the system export CPP='llvm-gcc-4.2' export CC='llvm-gcc-4.2' export CXX='llvm-g++' On OS X Lion (10.7), are these lines still

Error “no such instruction” while assembling project on Mac OS X

拜拜、爱过 提交于 2019-11-28 06:25:05
I used homebrew to install GCC 4.7.0 and my project's make is failing at assembly-time. I can successfully take code from .c -> .s, but .s -> .o fails. To view the brew formula used to install GCC, please look at: https://github.com/Homebrew/homebrew-dupes/blob/master/gcc.rb . I also installed binutils from upstream using https://github.com/mxcl/homebrew/blob/master/Library/Formula/binutils.rb . Install binutils does not appear to introduce a new 'as' in the /usr/local/lib or similar. How can I track down this missing instruction error? It appears the compiler is correct but the linker simply

How to customize disclosure cell in view-based NSOutlineView

旧街凉风 提交于 2019-11-28 06:01:08
I'm trying to customize the disclosure arrow appearance in my view-based NSOutlineView. I saw that it's recommended to use - (void)outlineView:(NSOutlineView *)outlineView willDisplayOutlineCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item delegate method to achieve it. The problem is that this method is not called for some reason. I have 2 custom cell views - one for item and second for header item. May be this method is not called for view-based outline views? May be something became broken in Lion? Please shed some light. Monolo This answer is written with OS X 10.7 in

Adding Older iOS SDKs to Xcode 4.1 in Lion

半世苍凉 提交于 2019-11-28 05:55:44
I just installed Lion and Xcode 4.1. How do I add older SDKs so I can build and run in 4.1 or 4.2 in iPhone/iPad Simulator? Xcode 4.1 only comes with the iOS 4.3 SDK. Does Lion have some sort of minimum SDK for builds? Thanks, Actually it is possible to add older SDKs as long as you can still get your hands on an older version of Xcode with the older SDK. It's useful too sometimes: when you do this you get to find out about unsupported constants and methods you may be using during compile rather than at runtime. Here's how to do it. Get hold of an older version of Xcode with the older SDK. The

How can I make python 2.6 my default in Mac OS X Lion?

﹥>﹥吖頭↗ 提交于 2019-11-28 04:25:41
I just upgraded to lion and with it came Python 2.7. I need to use 2.6 as my default python as the project I primarily work on uses 2.6. Apple has provided two very simple ways to change the default python on OS X 10.6 Snow Leopard and 10.7 Lion. It's all detailed in the Apple man page for python(1): $ man python $ which python /usr/bin/python $ python -V Python 2.7.1 # # temporarily change version # $ export VERSIONER_PYTHON_VERSION=2.6 $ python -V Python 2.6.6 $ unset VERSIONER_PYTHON_VERSION $ python -V Python 2.7.1 # # persistently change version # $ defaults write com.apple.versioner

Spurious calls to setValueAt with JTables in Java 7 on OS X Lion?

有些话、适合烂在心里 提交于 2019-11-28 04:15:43
问题 After upgrading to Lion, and Java 7, I am running into issues with JTables. When I use arrow keys to move the selection around, its calling setValueAt() with empty strings as the edit value. To test this, I created a simple JFrame with a table in it, and set the following class as its model. public class SpyModel extends AbstractTableModel { public int getColumnCount() { return 5; } public int getRowCount() { return 5; } public Object getValueAt(int rowIndex, int columnIndex) { return ""; }