osx-lion

SDL with g++ on OSX Lion

半腔热情 提交于 2019-12-07 14:39:46
问题 Dose anyone know how to set up SDL (simple direct media layer) on OSX Lion so I can compile my code with g++ ? I have read the "readme" that comes with the package and I have placed the frameworks folder in the relevant directory, however, this does not seem to be enough. Can anyone help me ? (I do not want to use Xcode) 回答1: If you're not using XCode, and are compiling SDL projects using gcc , you can run: gcc -o test SDLTest.c `sdl-config --cflags --libs` g++ -o test SDLText.c `sdl-config -

How to handle NSTextView preferences (spelling and grammar, substitutions,…)

◇◆丶佛笑我妖孽 提交于 2019-12-07 09:57:00
问题 The NSTextView class allows the user to dis-/enable features like "spelling while typing" with the context menu (right click). But when I use a NSTextView in my own app, those preferences are not saved automatically by the text view itself, which means that I have to save them separately - right? Now I also want to allow the user to change those settings in my app preferences (like in TextEdit). What I do is to save the text view preferences in the user defaults, which means that every time

Get a list of unmountable drives using Cocoa

会有一股神秘感。 提交于 2019-12-07 08:55:05
问题 I would like to obtain a list of drives that are unmountable/ejectable using Cocoa/Objective-C under OS X. I was hoping that NSWorkspace getFileSystemInfoForPath::::: would help me: NSArray* listOfMedia = [[NSWorkspace sharedWorkspace] mountedLocalVolumePaths]; NSLog(@"%@", listOfMedia); for (NSString* volumePath in listOfMedia) { BOOL isRemovable = NO; BOOL isWritable = NO; BOOL isUnmountable = NO; NSString* description = [NSString string]; NSString* type = [NSString string]; BOOL result = [

com.apple.iokit.CHUDKernLib Kernel Panic Fix

北慕城南 提交于 2019-12-07 07:57:28
问题 com.apple.iokit.CHUDKernLib seems to be causing the panic. The panic occurs everytime I boot. I can only boot in safe mode. Help! I have done the uninstall command for Xcode 3.2 but it didn't uninstall. Its something to do with a CHUD kext apparently. Im currently on holiday so it isnt possible to take it to the Apple store. Its a 2012 15 MBP with Mountain lion installed. 回答1: Fixed! First of all I just want to say, anything that may happen to your machine in the process of this repair

Can't use node modules installed by NPM despite correct NODE_PATH on a Mac

一笑奈何 提交于 2019-12-07 06:13:43
问题 Running on OSX 10.7 (Lion). Tried including as much detail here. I (foolishly?) decided to upgrade to the latest NODE and NPM. I git-ed and curl-ed like a good boy, and ended up with this: >node -v v0.5.9 >npm -v 1.0.99 added export NODE_PATH=/usr/local/lib/node_modules:/usr/local/lib/node which yields: >echo $NODE_PATH /usr/local/lib/node_modules:/usr/local/lib/node But every require I have in all my scripts fails in finding any of my modules. It either looks in the local library, or just

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

↘锁芯ラ 提交于 2019-12-07 05:00:56
问题 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

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

China☆狼群 提交于 2019-12-07 03:09:43
问题 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? 回答1: 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

Detect Lion (OS X 10.7) in javascript?

馋奶兔 提交于 2019-12-07 01:11:08
问题 Is there a way to detect if the operating system is OS X Lion or not in Javascript? Cheers! 回答1: The user agent of Safari (and also Firefox) in Lion is something like Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3 There is "Mac OS X 10_7_1" in it - this indicates Lion (= Mac OS 10.7). See here: http://www.whatsmyuseragent.com/ You can read the user agent string using "navigator.userAgent" 回答2: http://www.quirksmode.org/js

perl “…/config.h, needed by `Makefile'” not working after OSX Lion upgrade

亡梦爱人 提交于 2019-12-07 01:02:54
问题 SOLVED. See at bottom. Just upgraded to OSX Lion and trying to get my Perl install running again: sudo /usr/bin/perl -MCPAN -e 'install "MODULENAME"' with any value of MODULENAME that I tried (e.g. JSON ) produces: ... Checking if your kit is complete... Looks good Writing Makefile for JSON make: *** No rule to make target `/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/config.h', needed by `Makefile'. Stop. MAKAMAKA/JSON-2.53.tar.gz /Developer/usr/bin/make -- NOT OK I can't find

Xcode not building app with changes incorporated

烂漫一生 提交于 2019-12-06 21:48:04
问题 After upgrading to Lion, Xcode 4.1 is no longer building my iOS apps with the latest changes incorporated (i.e code, bundle name, icon changes). Before the upgrade, when I was using Snow Leopard, no matter what the change, or even if I replaced a file outside of Xcode with Finder or used an external text editor, Xcode would always build a fresh copy with all of the changes incorporated, without having to do any extra steps. Now, Xcode seems to insist on using a previous version, and the only