osx-lion

How can I implement gesture recognizers in OS X?

烂漫一生 提交于 2019-12-05 17:48:11
问题 I have done quite a bit with gesture recognizers for iOS, but I am now doing work in OS X, and I am lost. I want to duplicate the functionality that exists like in Finder where you can two-finger swipe (on your magic mouse) to go back/forward through a directory tree. I have an NSWindow based app that looks very similar to Finder. I have used apps before that allows you to build your own gesture recognizers so I know it is possible to do it, but I don't see any documentation on it. What do I

GDB 7.3.1 on OSX Lion

£可爱£侵袭症+ 提交于 2019-12-05 15:15:48
I'm trying to use GDB (v 7.3.1) from macports to debug an executable compiled with g++ 4.7 (also from macports). However, I start the debugger, I get the following output: GNU gdb (GDB) 7.3.1 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-apple-darwin11.2.0". For bug reporting instructions, please see: http:/

PostgreSQL permissions issue after upgrading to OS X Lion

只愿长相守 提交于 2019-12-05 14:57:57
After upgrading to Lion, I get the following error when trying to start up the Postgres server: pg_ctl: could not open PID file "/usr/local/var/postgres/postmaster.pid": Permission denied I also tried to re-run the initdb command, but ran into a similar problem: initdb: could not access directory "/usr/local/var/postgres": Permission denied If it matters, PostgreSQL was installed via Homebrew. Running brew info postgresql yields the expected results (version, summarized docs). Well, it turns out the solution was pretty simple. I changed the group on /usr/local/var to staff (from wheel) and

Lion OSX: How to install libfreetype.6.dylib?

半世苍凉 提交于 2019-12-05 13:44:50
问题 I am trying to install a ruby gem, but the installation process is stopped, because: ld: file not found: /usr/local/lib/libfreetype.6.dylib for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) How can I install this library? I checked the /usr/local/lib/ and the library is missing there. EDIT: I ran locate libfreetype.6.dylib and got: /Applications/MAMP/Library/lib/libfreetype.6.dylib /Applications/VLC.app/Contents/MacOS/lib/libfreetype.6

Cocoa Autolayout - Why can't I delete or modify the (purple) width constraint on a Text Field?

☆樱花仙子☆ 提交于 2019-12-05 10:49:55
问题 I'm building a simple application using autolayout, and I've run into a strange situation. I place a Text Field in an empty part of a large open view so it's not affected by anything but the super view, but when I try to modify the "Width" constraint to be >= instead of ==, it creates a new constraint and refuses to modify the old one. I can't delete it, or change any of its attributes, because it just creates a new one. Here is a comparison of the two constraints, the purple one being the

Mac OS X Lion has no /Developer/usr folder

人盡茶涼 提交于 2019-12-05 10:31:10
I have been fiddling around trying to get Eclipse for C++ working on Mac OS X Lion. I have downloaded Xcode 4.3, so there should be a /Developer/usr folder with gcc, g++, make and other compiler commands. However, while I have a /Developer folder, I do not have a /Developer/usr folder anywhere. Where can I get this from? I think it may have disappeared when I attempted to symlink the contents of /Developer/usr/bin to the default /usr/bin for Eclipse to use. Not sure if this can even happen. This has driven me crazy for about a week now! /Developer was moved to /Applications/Xcode.app/Contents

RSpec stopped working after upgrading to OSX Lion

感情迁移 提交于 2019-12-05 09:19:10
问题 dyld: Library not loaded: /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib Referenced from: /opt/local/bin/identify Reason: image not found Does anyone have a solution? Would upgrading Xcode to 4.1 help? 回答1: Your /opt/local/bin/identify is probably ImageMagick’s identify. You probably need to rebuild your installation of ImageMagick. Based on the pathname ( /opt/local/ ), you probably installed it as a part of MacPorts. You should probably follow the

How to add row-span in view-based NSTableView?

天涯浪子 提交于 2019-12-05 08:32:40
I'm trying to get a table layout as shown below working with view-based NSTableViews that have been introduced in Lion. There were multiple approaches described for cell-based NSTableViews, e.g. Mimic the artwork column , but these don't really apply for view based table views. The idea is that the table gets populated by an array of objects, in one (or more) column spanning rows indicating that objects share some data in common. numberOfRowsInTableView: returns to total number of items (19 in the case of the attached image). Has anyone tried something like this? Layout I was able to do this

PIL ImageTK not loading image in py2app application bundle

时间秒杀一切 提交于 2019-12-05 08:01:19
I'm testing out an app that I've made which, amongst other things, loads a couple of .png images when opened. The images are displayed correctly on my Mac (10.7.5) and my mother's (10.8.5); however when my sister opens it on hers (10.9.5) the images don't load. All other functionality is otherwise intact. I should note that on my Mac and my mother's, I installed Python 3.4 and many of the packages that the app uses, including the PIL package, whereas my sister has none of these. The app was build using the command: python3.4 setup.py py2app Images are imported in the code with: image = ImageTk

Why do I need to use “rvm use default” after opening new terminal window?

落爺英雄遲暮 提交于 2019-12-05 07:47:31
On opening a new terminal window (Mac OSX 10.7.2) and entering rails , I get the always fun 'rails is not currently installed..." message. But I enter rvm use default 1.9.2 and all is good with the world. Where did I go wrong? nobody Zabba is right in the comments when he says the correct command to use is rvm use 1.9.2 --default . RVM considers default to be a Ruby, equivalent to the Ruby set to the default. If I type rvm use default into my terminal, I get this output: $ rvm use default Using /Users/tom/.rvm/gems/ruby-1.9.3-p0 However, there is the ability to list multiple Rubies in your