osx-lion

How do i install additional packages for Xcode on OSX Lion to allow MacPorts to work

我的梦境 提交于 2019-12-04 05:35:30
When I try and install MacPorts it complains 'Xcode is not installed, or was installed with UNIX Development (10.5+) or Command Line Support (10.4) deselected.' I do have Xcode installed from the Appstore so I guess I just have to install these extra parts but how ? Ive read a couple of questions on Stack Overflow about this but I think the answers must be outdated as they do notmake sense for me, I do not have an Xcode dmg I can reinstall from, and I can't see anything useful in /Developer either, or any preferences within Xcode itself. I only want Xcode for the purposes of using Macports so

Mail like search field with tokens (Mac OS X 10.7)

心已入冬 提交于 2019-12-04 04:23:10
Is there a standard control for developers to get the search field behavior like in Mail (Mac OS X 10.7) to make advanced searches with tokens? In Mail the tokens are used to visualize a search for a mail which for example was sent by a person with the name "Steve Jobs". I try to accomplish the same but in another context. What your looking for is called a token field. See the Token Field Programming Guide . (Also documented on the CocoaDev Wiki ) 来源: https://stackoverflow.com/questions/8643690/mail-like-search-field-with-tokens-mac-os-x-10-7

-[NSResponder swipeWithEvent:] not called

瘦欲@ 提交于 2019-12-04 04:10:32
I am writing an application targeting OS X Lion and Snow Leopard. I have a view that I want to have respond to swipe events. My understanding is that three-finger swipes will call -[NSResponder swipeWithEvent:] if that method is implemented in my custom view. I have already looked at this question and corresponding answers, and tried the following modified stub implementation of Oscar Del Ben's code: @implementation TestView - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { // Initialization code here. } return self; } - (void)drawRect:(NSRect)dirtyRect { [

Scrapy installation on OSX Lion

被刻印的时光 ゝ 提交于 2019-12-04 03:35:13
问题 So I'm trying to install Scrapy on Lion and am not sure if it's properly installed or not. I followed the guide here http://doc.scrapy.org/en/latest/intro/install.html#intro-install Then tried to do the first step to create a tutorial project here, http://doc.scrapy.org/en/latest/intro/tutorial.html But when I try to run, scrapy startproject tutorial It doesn't work. I get... $ python scrapy /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't

NSSavePanel and the Sandbox

夙愿已清 提交于 2019-12-04 03:21:19
I have some problems understanding the new Lion's Sandbox. I know that Lion includes a trusted daemon process called Powerbox whose job is to present and control open/save dialog boxes on behalf of sandboxed applications. Like the Code Signing And Application Sandboxing Guide says: Any time an application running inside a sandbox invokes an NSOpenPanel or NSSavePanel dialog, rather than showing the panels directly, AppKit automatically asks the Powerbox to present the dialog. From a developer perspective, there are no code changes required in terms of how these panels are used; this process is

How can I implement gesture recognizers in OS X?

淺唱寂寞╮ 提交于 2019-12-04 02:27:34
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 need to do to implement these gestures? You can read about Handling Trackpad Events in the Cocoa Event

Too many levels of symbolic links osx Lion

无人久伴 提交于 2019-12-03 21:56:53
i'm try to install a libraries but when the make file try to attempt to Developer folder it appear message Too many levels of symbolic links. So i try: Go home folder (cd /) then i try: bash-3.2# cd Developer and this is the output: bash: cd: Developer: Too many levels of symbolic links what could be the problem? can you help me? ls -l says me lrwxr-xr-x 1 root wheel 10 14 Mar 09:13 Developer -> /Developer If go to: cd / and ls -la outputs: lrwxr-xr-x 1 root wheel 10 14 Mar 09:13 Developer -> /Developer That's a problem. /Developer should be a folder , not a symlink pointing to itself. Find

vi - getting an error E212: Can't open file for writing

℡╲_俬逩灬. 提交于 2019-12-03 21:47:37
I am following this tutorial for setting opendiff for git: http://thomashunter.name/blog/set-opendiff-filemerge-as-your-git-diff-tool-on-os-x/ I open vi like it said in tutorial, write some lines and try :wq but get error - error E212: Can't open file for writing I browsed stack overflow for a little bit, and tried typing sudo vim ~/bin/git-diff.sh But I am also getting the same error. I haven't had much experience with unix based systems, so what am i to do? You don't have a bin directory below ~ (which is /Users/username ). The error message of "~/bin/git-diff.sh" [New DIRECTORY] at the

Vim colors too bright (terminal)

こ雲淡風輕ζ 提交于 2019-12-03 21:40:33
I have a problem with Vim and iTerm2, the colors are too bright (for ALL themes). It works with both Terminal.app and MacVim, so I guess it must be some setting in iTerm2 I've completely missed. The picture below shows you the difference (iTerm2 to the left, MacVim / Terminal.app to right): What I'm using: iTerm2: Build 1.0.0.20130624 Terminal type: xterm-256 Shell: zsh 5.0.2 Vim: version 7.3.666 OS X: 10.7.5 Do you guys have any idea what I'm missing? You shouldn't compare colorschemes in GUI Vim and in CLI Vim: the number of colors that can be used in both contexts is very different and it

Adding version infomation to an OSX command line application

孤人 提交于 2019-12-03 21:33:36
On Windows I'd simply add an RC file with the right data. Do I need to assemble a bundle as usual with an info.plist/version.plist or is there a better, standard , way of doing things? This is for Snow Leopard and later if that is relevant. Thx++ JWWalker It is possible to embed an Info.plist file in an executable as a special Mach-o section. See for example this question . If you have a command line application, then it's just a single file and not a traditional OSX app package (with a Contents folder and a MacOS + Resources folder underneath). If you're not willing to do a full blown