osx

Determine if an executable (or library) is 32 -or 64-bits (on OSX)

Hello, (sorry, i -almost- stoled the title from someone else). Is it possible to get information about any binary on Snow Leopard, to determine if it's a 32 bits or 64 bits binary ? I played with the 'otool' command but can't find this kind of information. Thanks. ...

MySQL install on OSX, I want to start again, is it safe to delete all mysql folders?

I want to start again with attempting to install MySQL on OSX, I typed this to find all folders find / -name mysql. Is it safe just to delete all of the folders that I found? /opt/local/include/mysql5/mysql /opt/local/lib/mysql5/bin/mysql /opt/local/lib/mysql5/mysql /opt/local/share/mysql5/mysql /opt/local/var/db/mysql5/mysql /opt/loca...

MAC OSX, which version of MySQL should I download?

I have a MAC OSX 10.6, intel 64 bit, I'm looking at the mySQL download options at http://dev.mysql.com/downloads/mysql/5.1.html#macosx There are no download options for 10.6, do you think the 10.5 downloads below will work? Mac OS X 10.5 (x86) Mac OS X 10.5 (x86_64) Cheers ...

Cucumber + Rspec + Rails + Webrat, factor_girl + autotest on MacOSX ... in gem.config ?

I found example how to use on: http://www.claytonlz.com/index.php/2009/04/how-to-setup-rspec-cucumber-webrat-rcov-and-autotest-on-leopard/ but I try to find solution to put this all gems to gem.config (enviroment.rb) with using gemcutter gem repository (this is prefered gems repository now ?) Maybe some one have properly configured ge...

JDialogs cause my application's menus to disappear on OSX

Whenever any of my JDialogs have focus the toolbar does not display any menus accept for my applications main menu (it doesn't show file edit etc....). Is this an issue inherent to JDialogs/Swing or is this some sort of problem with how I made my dialogs? ...

Get the name of application in focus (on Mac)

Hello All, I have a requirement where, I need to have the name of the running application in focus. I am using C++/Qt/Carbon. Any help is highly appreciated. Thanks, Rahul ...

Little Bash Script: Catch Errors?

I've written (well, remixed to arrive at) this Bash script # pkill.sh trap onexit 1 2 3 15 ERR function onexit() { local exit_status=${1:-$?} echo Problem killing $kill_this exit $exit_status } export kill_this=$1 for X in `ps acx | grep -i $1 | awk {'print $1'}`; do kill $X; done it works fine but any errors are shown...

Can't open Eclipse in OS X

I did an apple update today, and now Eclipse won't open. I downloaded Eclipse again, and replaced my old copy with the fresh download, and nothing improved. Any ideas? I'm running Eclipse 3.5 for EE in Mac Snow Lepeard. Here are some of the details provided: Process: eclipse [347] Path: /Users/eric/eclipse/eclips...

Registering a URL protocol handler in a multiple platforms.

I an wanting to create a Java application that is installed on multiple platforms (Windows,Mac OS, Linux) as a part of this install I wish to register a URL protocol handler, so that my app loads when links are clicked. i.e. I want something like this: myprotocol://example.com Is there any sort of consolidated way of doing this? Or som...

is there a scripting solution for determining the default application path for a file on the Mac?

For a given extension, for example ".psd", I'd like to be able to determine the default application path for opening this file, for example "/Applications/Adobe Photoshop CS4.app". I've looked into the Launch Services API, and there are clearly programmatic ways to get this information. Unfortunately for my particular scenario, only a ...

Compiling and executing the Shakespeare Programming Language translator spl2c on Mac OS X 10.6 results in warnings/errors

I wanted to experiment with the Shakespeare programming language, so I downloaded it from here and executed the Makefile using cd spl-1.2.1 Make. The compilation of spl2c executes with a couple warnings: scanner.l:600: warning, rule cannot be matched <stdout>:5808: warning: ‘yyunput’ defined but not used And then when it at...

Programatically Removing a Button from a Window in Cocoa OSX

I need to programatically remove a button from a window in Cocoa but the only method close to this was dealloc in NSObject, but this is not what I want to do. Is there a way to actually delete the button from the window not just deallocate its memory? ...

Java swixml in an OSX app bundle

Hello, I'm developing an application in Java and have gotten it rolled into an app bundle, but I'm having issues with the xml file for building my Gui. I would like to store the xml file inside the app bundle, but the only way I've been able to get it to work is to directly access the file Application.app/Contents/Resources/Java/Gui.xml...

Cannot find NSExpression while compiling for OSX 10.6

I am building a very simply Core Data + Core Animation application. While compiling for OSX 10.6, 64 bits, Xcode keeps throwing the error: /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreData.framework/Headers/NSFetchRequestExpression.h:16:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreData.framework/Head...

Get the path of the .dmg from the mount point

I'm looking for a way to get the .dmg path of a mounted disk image with just its mount point. I want to write a "simple" Finder service that ejects the disk image and trashes the accompanying .dmg. The ejecting is trivial, but I'm at a loss as to how to figure out the path of the .dmg, given just the mount point. diskutil doesn't seem ...

Programmatically closing an NSWindow when it loses focus

I am making an image picker that will display an n by n grid of selectable button when the picker is popped up. This grid of buttons will be contained within an NSWindow but I would like for the window to be close automatically if the user clicks off the screen. Is there a flag that can be set so that when the window looses focus it wi...

Why does NSURLCredential require both an identity and a certificate list?

In the initWithIdentity:certificates:persistence: method, what is the purpose of the certificates argument? The identity has a certificate associated with it, so which other certificates am I expected to pass to this call? The server is not accepting my certificate, and I suspect it is because I'm calling this wrong. This is my callba...

Darwin: how to kill parent process without killing child?

On OS X 10.4/5/6: I have a parent process which spawns a child. I want to kill the parent without killing the child. Is it possible? I can modify source on either app. ...

Objective-C/Cocoa tutorial for internet capable application?

I've done a bit of iPhone programming (even have 1 published app) but what I'm really interested in doing is learning to create applications for OS X. I'm a 7 year .Net Developer so I have some understanding of how to make desktop applications, though I don't know much about memory management as .Net spoiled me. I was hoping someone coul...

Can't update RubyGems

Hi! I'm having difficulties updating RubyGems from version 1.1.1 to newest. I've tried the following: gem update Result: Updating installed gems Bulk updating Gem source index for: http://gems.rubyforge.org/ Nothing to update and gem install rubygems-update Result: Bulk updating Gem source index for: http://gem...