osx-lion

What is the best way to setup Django on os X 10.7 Lion?

∥☆過路亽.° 提交于 2019-12-06 12:07:03
问题 I am setting up Python and Django on os X 10.7 from a virgin install and Xcode 4.3. I tried using the default install of Python: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ I normally use a Python based package manager called easy_install. Easy_install seems to not be able to find the compiler. EDIT: When I tried to install MySQL-python I got this error: $ sudo easy_install MySQL-python Password: Searching for MySQL-python Reading http://pypi.python.org/simple/MySQL

SVN ignore problem in OS X Lion

淺唱寂寞╮ 提交于 2019-12-06 11:50:32
Before installing Lion, when I tried to ignore something on my svn, I just typed the following command: svn propedit svn:ignore . This opened a temporary file for the current directory with the selected editor and I could write there my patterns, which where ignored by svn. After I installed Lion, when I type this command the following error appears: The document “svn-prop.tmp” could not be opened. The file doesn’t exist. Did anybody else met this error before? (I tried googling, but I didn't find any solution). SVN_EDITOR=/Applications/TextEdit.app/Contents/MacOS/TextEdit It seems that with

In OS X (lion) how can I find whether a key combination is in use as a keyboard shortcut?

ぃ、小莉子 提交于 2019-12-06 11:33:50
I want to put a bunch of keyboard shortcuts in my app (OS X lion) so I can do most things from the keyboard. There are of course a bunch of lists of hot key combos in use already, including the one in the HIG. Is there some utility that can be used to type a key combination and find out if it already means something (either globally, or mac standard -- I'm not too worried about reusing some special combo used by another app -- or should I be?)? You can use Carbon to do this. Don't be afraid to use Carbon here, there is no Cocoa way to get this information and the Carbon methods are still

How to FullScreen Your Apps With Lion New API

99封情书 提交于 2019-12-06 11:04:03
问题 Lion support full screen app in the separate space. And It's cool to slide the space by gusture. But I don't know how to make it for my own app. 回答1: There are two ways to get your window to have the fullscreen button in the corner. [[NSApplication sharedApplication] setPresentationOptions:NSFullScreenWindowMask]; and [window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary]; I wrote a bit more about it in a blog post here 回答2: See this document. Basically, you can call the

Detect click on OS X menu bar?

偶尔善良 提交于 2019-12-06 10:42:55
I'm curious if there's a trick to detecting a click on the Menu Bar as a whole. I know I can detect a click on an NSStatusItem or NSMenu, but I am looking for events pertaining to the empty space of the Menu Bar. Looking through the documentation, it does not seem possible. However, I wanted to know if anyone had a workaround for this functionality? You can install a local event monitor using NSEvent addLocalMonitorForEventsMatchingMask:handler: See the documentation located here . 来源: https://stackoverflow.com/questions/7249239/detect-click-on-os-x-menu-bar

How do I get ibm_db or PyDB2 python modules to work with DB2 in Mac OS X 10.7 Lion?

♀尐吖头ヾ 提交于 2019-12-06 10:38:43
问题 I used this question/answer to install DB2 in Lion: How do I install IBM DB2 Express-C on Mac OS X 10.7 Lion? After configuring my databases, I am able to use db2 from the command line to execute queries, but the python modules ibm_db and PyDB2 both fail to import with the following error: >>> import ibm_db Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: dlopen(/Library/Python/2.7/site-packages/ibm_db-1.0.4-py2.7-macosx-10.7-intel.egg/ibm_db.so, 2): Symbol

Fread on Lion does not read when length > 2G

做~自己de王妃 提交于 2019-12-06 09:03:47
问题 Since Macosx Lion fread does not read file with length > 2G (int size, 2'147'483'648 bytes). It worked for years with macosx snow leopard. I wrote a program to test it : #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *argv[]) { FILE *fin = NULL, *fout = NULL; char *ptr = NULL; size_t len; fpos_t flen; if (!(fin = fopen(argv[1], "rb"))) { printf("The input file: %s could not be opened\n", argv[1]); return -1; } if ((fout = fopen(argv[2], "rb"))) { printf(

RVM + Ruby 1.9.2 + Rmagick + Lion = System Works, RVM Doesn't

☆樱花仙子☆ 提交于 2019-12-06 07:53:32
问题 I've installed Ruby 1.9.2 through RVM on a fresh install of OS X Lion. I have installed ghostscript and imagemagick through homebrew, and when running gem install rmagick using RVM, it fails. When using gem install rmagick on the system install of ruby, it works just fine. This is the error that is produced: ─wedtm@WedHQ ~/.rvm/gems/ruby-1.9.2-p290/cache ‹ruby-1.8.7› ╰─$ gem install rmagick 1 ↵ Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR:

View based NSTableView EXC_BAD_ACCESS on Lion with ARC

不羁岁月 提交于 2019-12-06 06:59:54
问题 This is weird. I've got a super simple project to learn NSTableView, and it's set up in my nib, set as a View-based tableView. I've also set the dataSource and delegate to my controller obejct. When I do this, however, and run, I get an EXC_BAD_ACCESS, with the trace starting in my main function and the rest of the stack is internal to Cocoa (so not my code). There's really nothing fancy going on, other than this project is using ARC (it's a new project, so this was the default). I also tried

InetAddress.getLocalHost() resolution on OSX Lion when offline

僤鯓⒐⒋嵵緔 提交于 2019-12-06 05:45:37
问题 Is anyone having issues with Java's InetAddress.getLocalHost() resolution in Java with OSX Lion when working offline (i.e. not connected to internet)? It would appear that localhost:127.0.0.1 is not resolved at all: Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 at java.net.InetAddress.getLocalHost(InetAddress.java:1356) Nothing special in my /etc/hosts: ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry.