osx

Two executables in one bundle on MAC

Hi, Is it possible to have two executables each with its own plist to share the same bundle. Then depends on the way app is executed (parameters) to load the appropriate executable. Imagine the case where we have a main application (executable with UI) and the mini application (shorter version of the main app also with its own UI) and ...

Tips for transitioning from Emacs to Xcode

I'm a developer making the transition from Linux/Emacs to OSX/Xcode. Does anyone have any tips or recommendations for smoothing this transition with regard to text editing? Specifically: What Emacs habits caused the most heartburn upon switching, i.e. what errors did you make repeatedly that were a result of an Emacs background? Was...

why is screen not showing the current running process name? (Mac OSX Terminal bash)

I am running screen inside Mac OSX Terminal app (bash). Here is the screenrc (got it from here): $ cat ~/.screenrc termcapinfo xterm* ti@:te@ startup_message off defutf8 on shelltitle "$ |what?" # make screen assign window titles automatically hardstatus alwayslastline hardstatus string '%{= kw} [ %{= kb}%H%{= kw} ][%= %{= kw}%?%-Lw?...

How to Open Terminal Window Automatically on Mac OS X

On my Mac, there is no window open when I start Terminal app. I just played with a friend's Mac, a window is automatically opened on startup of terminal. He doesn't know how it's done. I just played with preferences and couldn't find anything for that. Does anyone know how to do that? ...

How do you install lxml on OS X Leopard without using MacPorts or Fink?

I've tried this and run in to problems a bunch of times in the past. Does anyone have a recipe for installing lxml on OS X without MacPorts or Fink that definitely works? Preferably with complete 1-2-3 steps for downloading and building each of the dependencies. ...

Which function does Leopard's Finder get the preview icons with the watermark on them?

I already took a look at GetIconRefFromFileInfo() and QLThumbnailImageCreate() but they just doesn't seem to be similar with what I see from the finder, which is a square icon with watermarks on it, e.g. if the file is RTF, it has this greyish watermark below that says RTF or RTFD or PDF... Please help me out on this. Thanks. If the que...

How do I fix "Symbol not found: _is_prefix" when compiling Perl's DBD::mysql?

First I wanted to build the DBD::mysql package. That kept failing because whatever make resulted in could not be loaded for the tests with a Symbol not found: _is_prefix. So I assumed that cpan might be a tad old. I know it's a random assumption, but cpan did tell me to install the latest Bundle::CPAN. Who's successfully installed eithe...

How can I configure Apache to run Perl CGI scripts?

I want to configure Apache web server to run CGI scripts on Mac OS x 10.5. I have already started Apache Web Server on Mac. What are the steps to make the Apache run the Perl scripts? ...

Install PDO on OS X Leopard

What's the easiest way to install PDO on the default php installation of OS X Leopard? I'm trying to get ModX running. ...

Emacs 23 on OS X - pseudo terminal will not be allocated because stdin is not a terminal

I installed Emacs 23 on OS X (the NS/Cocoa variant) and I got the following error when I tried to run ssh from a shell inside emacs. "pseudo terminal will not be allocated because stdin is not a terminal". Searching around the web tells me that it is because stdin is somehow a pipe instead of a real tty. I confirmed that by running st...

How do you use Objective-C starting from the "Java JNI Application" template in XCode?

I want to use the NSStatusBar object from my Java application using JNI. I know there's some existing libraries out there but I've tried them and they don't have the correct drop down menu. I'm starting from the "Java JNI Application" template in XCode and I simply put NSString *str=@""; to see if it could compile but this produces ...

Suggestions for Fun Web Programming Projects at Home

Given Jeff Atwoods assertion that All Programming is Web Programming, and having newly setup Apache on OSX with dynamic DNS on a home machine, what would the StackOverflow community suggest as fun programming projects to build on this, and what technologies to use? ...

How to get the desktop resolution in Mac via Python?

Trying to write a python application that downloads images from an RSS feed, and makes a composite background. How do I get the current desktop resolution on Mac OS X (leopard?) ...

boost asio example crashes on mac osx

Hi, I am trying to run blocking_udp_echo_server.cpp from Boost asio example on MacOSX 10.5. But it crashes: From the console: /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/debug/safe_iterator.h:127: error: attempt to copy-construct an iterator from a singular iterator. Objects involved in the operation: iterator "this" @ 0...

Using Python to read the screen and controlling keyboard/mouse on OSX.

I'm looking for or trying to write a testing suite in Python which will control the mouse/keyboard and watch the screen for changes. The obvious parts I need are (1) screen watcher, (2) keyboard/mouse control. The latter is explained here, but what is the best way to go about doing the former on OSX? ...

Best location for database file in Mac OSX

I'm working on an installer for an application that I have ported to OSX, but I don't have much experience with this OS so I want to know where is the most appropriate location to install a database file that will be used by my app. The database file is relatively small, and will be updated by a daemon process but must be accessible to...

How to use the alt/option key as the "meta" key in NetBeans on OS X with emacs keybindings?

NetBeans supports emacs-style keybindings, but for some reason it uses cmd as the "meta" key instead of alt, which seems to be the standard on OS X. (Terminal.app has a checkbox for "use option as meta key", for example.) How can I switch to using alt/option as the "meta" key for emacs-style keybindings? ...

How to get correct line numbers in symbolicated crash reports (iPhone / Mac)?

When symbolicating crash reports, I noticed that line numbers are off. I tested this with a project in which I deliberately cause a crash. It seems the generated line number do not include certain lines, e.g. comment lines or compiler preprocessor statements (not sure what it does and does not include)... Is there an easy way to get fro...

Xcode 3.1 localization: If I change the interface, do I need to change this for each localization??

Hello! I've just made an application in Xcode, and I'm trying to localize it. I right-clicked (Ctrl-clicked) my .xib and clicked 'Get info'. I added Dutch to the list of localizations and Xcode made copied my .xib file. Do I need to change the .xib file for every single localization when I make an adjustment? Or is there another way to ...

Auto-Indentation in a NSTextView

I'm working on a simple code editor in Cocoa. I have a text view, and I want it so that when the user hits return, the new line is indented the same as the previous line (like in Xcode or any other code editor). My problem is that I can't figure out how to either intercept when the return/enter key is pressed or when a new line is creat...