osx-lion

Setting the scrollbar color in Safari for Lion (OS X 10.7)

笑着哭i 提交于 2019-12-09 18:34:02
问题 The new scrollbars in Lion seem to adjust their color in Safari based on the background color of the body element. Is there a way to manually set whether the scrollbar should be dark or light? I know there are webkit CSS options to style the scrollbar which actually predated the new Lion scrollbars. My only issue with using that method is that the bar no longer functions like the real Lion one which fades out after scrolling has stopped. While I suppose that this could be accomplished using

How to use libxml2 with python on macOs?

馋奶兔 提交于 2019-12-09 17:55:41
问题 I'm on OSX Lion and I have libxml2 installed (by default) and I have python installed (by default) but they don't talk to one another. What's the simplest way to make this work on Lion? $ python -c "import libxml2" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named libxml2 回答1: Visit ftp://xmlsoft.org/libxml2/python/ and ensure this is the latest version Download it unpack it open a term and cd to that directory type sudo python setup.py

Native OSX Lion resize cursor for custom NSWindow or NSView

吃可爱长大的小学妹 提交于 2019-12-09 16:30:43
问题 If we use NSTrackingArea for some specified region then we can implement such method to change the default cursor: -(void)cursorUpdate:(NSEvent *)theEvent { [[NSCursor resizeLeftCursor] set]; } I implementing custom resize for NSWindow , which uses NSBorderlessWindowMask . And want to use native Lion's two arrows cursors. But such type of cursors not exist in NSCursor API. Can I get such native cursors somehow from code? Or maybe I must redraw them by hand (not a good idea)? 回答1: WebKit

Adding version infomation to an OSX command line application

痴心易碎 提交于 2019-12-09 14:03:48
问题 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++ 回答1: It is possible to embed an Info.plist file in an executable as a special Mach-o section. See for example this question. 回答2: If you have a command line application, then it's just a single file and not a traditional OSX app package (with a

Ruby fails on OSX Lion with rbenv

淺唱寂寞╮ 提交于 2019-12-09 11:32:51
问题 I've been trying to install Ruby on my Lion machine (OSX 10.7.3). I installed rbenv and ruby-build and am trying to get 1.9.2-p290 on my machine. Here is the output of the install failing: $ rbenv install 1.9.2-p290 Downloading http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz... Installing yaml-0.1.4... Installed yaml-0.1.4 to /Users/CSC/.rbenv/versions/1.9.2-p290 Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz... Installing ruby-1.9.2-p290... BUILD FAILED Inspect

Lion update removed the 'postgres' user. How to restore it?

廉价感情. 提交于 2019-12-09 11:17:42
问题 I've installed postgres with the kyngchaos installer a couple of months ago. I've now updated to OSX Lion, but the database server fails to start. A comment on kyngchaos's blog (http://www.kyngchaos.com/blog/2011/20110723_lion) made me look at the 'postgres' user: it doesn't exist anymore! At least, I can't "sudo su postgres" anymore. So I figure that's the reason my server doesn't run. How can I best restore that user? 回答1: (Answering myself) In the end, the only thing I needed to do was to

Can AutoLayout equally space multiple buttons?

点点圈 提交于 2019-12-09 10:38:34
问题 I am trying to create a view that contains some buttons placed vertically and I would like the spaces between the buttons to be equal when the window is resized. The constraints (using the visual format) on this view are: H:|-0-[button1]-0-| H:|-0-[button2]-0-| H:|-0-[button3]-0-| H:|-0-[button4]-0-| V:|-0-[button1]-(>=0)-[button2]-(>=0)-[button3]-(>=0)-[button4]-0-| The buttons are displayed correctly except that only one of the three spaces defined to be >=0 is taken into account, while the

Java/OS X Lion: Setting application name stopped working with JDK1.7

核能气质少年 提交于 2019-12-08 17:07:52
问题 I hitherto used the following code to set the Application Name (in the top "System" menu bar) on my Apple MacBook. (Actually, I think I copied this from stackoverflow.) Basically, have a seperate AppLauncher class that uses System.setProperty() to set the application name before creating a new Runnable for the app itself. Worked just fine. However, since I downloaded and started using JDK 1.7, the solution stopped working - I'm getting the Class Name instead of the App Name in the menu, just

NSEvent and Magic Mouse

a 夏天 提交于 2019-12-08 13:49:34
How do I distinguish whether the event -(void)scrollWheel:(NSEvent *)event was triggered by a Magic Mouse or a trackpad? The reason I'm asking this question is because I want to assign a different action to the scrolling event when a trackpad is used because the user can pinch to zoom on the trackpad. On the magic mouse, however, the user can't pinch easily, so I want to use the scrolling function as a substitute for pinching. I can distinguish between a normal mouse and a Magic Mouse using this line: if (([event momentumPhase] != NSEventPhaseNone) || [event phase] != NSEventPhaseNone) However

How to configure jenkins with xvnc on OSX Lion for maven project

╄→尐↘猪︶ㄣ 提交于 2019-12-08 12:50:27
问题 When the jenkins job runs I get this output: ... Starting xvnc [workspace] $ /Applications/VNCServer.app/OSXvnc-server -rfbauth /Applications/VNCServer.app/pass.word :11 -geometry 800x600 2012-02-08 22:04:05.375 OSXvnc-server[3412:707] Arguments: -rfbauth /Applications/VNCServer.app/pass.word :11 -geometry 800x600 2012-02-08 22:04:05.394 OSXvnc-server[3412:707] Main Bundle: /Applications/VNCServer.app [workspace] $ /bin/sh -xe /var/folders/5d/jp_23pvd3bq5331x7myfcrym0000gq/T