osx

How can I print to the console in color on Mac OS X in a cross-platform manner?

How can I output colored text using "printf" on both Mac OS X and Linux? ...

do i need 32bit libxml2 for python on snow leopard?

i'm having a hell of a time installing scrapy on my sl mbp. it requires libxml2, so i set about installing that. installing it from macports doesn't seem to pull down the python binding. installing it from source through scrapy's instructions (here) does install the python bindings, but when i run 'python -c "import libxml2"' i get an a...

Modify sub key in *plist files

I'm would like to modify a subkey in a plist file (i.e. "TB Item Identifiers"): NSNavPanelExpandedStateForSaveMode = 1; NSPreferencesContentSize = "{508, 413}"; NSPreferencesSelectedIndex = 6; "NSToolbar Configuration BrowserWindowToolbarIdentifier" = { "TB Display Mode" = 2; "TB Icon Size Mode" = 1; "TB Is Shown" = 1; ...

Accessing Quicktime Framework from Java on Snow Leopard

I'm trying to embed a simple video player in a java application, and I'm considering using Quicktime since the application is Mac-specific. From what I'm seeing though it looks like Apple may have deprecated the Quicktime for Java library on Snow Leopard. Is that true? Is there another way to interface with Quicktime through Java? ...

I need to write a .DDS file cross-platform, can someone point me to example?

I need to create a .DDS file with code that runs on both OSX and Windows. Although the format doesn't look difficult, I'd still like an example of writing the file. Note I don't need to read it, just write it. C or C++ and RGBA bitmap. ...

Mysql 5.1 on Mac: query cache not working

Hi, I was wondering if someone could point me in the right direction. I have set up a local Mysql 5.1 sandbox on my Snow Leopard OSX machine, I have the Macports Mysql 5.1 installed and, by all appearances, functioning. It takes queries, the database is working, etc. The only strange thing is, the query cache isn't functioning. I have ...

When Should I Use The Interface Builder?

As I'm learning the iPhone API, the book I'm using has me doing everything possible with the Interface Builder. We (lonely here sometimes) are writing code, too, but I really feel like I'm getting to know the Interface Builder quite well. I know that the Interface Builder is different from other GUI Builders as it uses serialized object...

SIMD Sony Vector Math Library in OS X with C++

I'm currently writing a very simple game engine for an assignment and to make the code a lot nicer I've decided to use a vector math library. One of my lecturers showed me the Sony Vector Math library which is used in the Bullet Physics engine and it's great as far as I can see. I've got it working on Linux nicely but I'm having problems...

NSStatusItem not shown after sleep.

Hello, I've got a small Cocoa problem. I have a StatusBar application that has an NSStatusItem in the Menu Bar. It is drawn by a custom View as shown here. When the Main view of the app is hidden (most of the time), the computer goes to sleep and awakens again, I lose the icon and a blue rectangle is shown. Has anyone of you got any idea...

Audio/video Programming

I want to access Audio and video into my program. Is it possible to do in MAC. Our Program is working on Windows here i did audio/video programming using directshow. but i want to develop same in MAC. Is there any package same like directshow. Please give some valuable tips. ...

Scrapy install: no acceptable C compiler found in $PATH

I am trying to install Scrapy on a a Mac OS X 10.6.2 machine... When i try to build one of the dependent modules ( libxml2 ) I am getting the following error: configure: error: no acceptable C compiler found in $PATH I assume I need the gcc...is that easy to install on 10.6? Is there some sort of package I should be installing, so ...

Error installing scrapy on Mac Os X 10.6

Trying to install Scrapy on Mac OSX 10.6 using this guide: When running these commands from Terminal: cd libxml2-2.7.3/python sudo make install I get the following error: Making install in . make[1]: *** No rule to make target `../libxslt/libxslt.la', needed by `libxsltmod.la'. Stop. make: *** [install-recursive] Error 1 Followin...

Phing not working on OSX / MAMP

Here is what I have tried thus far: > cd /Applications/MAMP/bin/php5/bin/ > ./pear channel-discover pear.phing.info > ./pear install phing/phing Installation ran. I can run the following: > ./pear/ info phing/phing About pear.phing.info/phing-2.4.0 ================================= Release Type PEAR-style PHP-based Package ...

Get title of front window in carbon

Hello, I am writing a program to sit in the background on osx 10.6, listen to keystrokes and record them, grouping them by window title. (No, I am not writing malicious software. I do not need this program to be sneaky in any way, I just want to have a safety net for when I have typed a huge email and then accidentally refresh the page...

On MacOSX, using g++, is std::vector .size() thread safe?

I have a std::vector<...> that is shared in two threads. Both of them make calls to vec->size(); Can this be a source of race conditions? I'm hoping not since vec->size() is const. Thanks! ...

how do i open up and run an asp.net project compiled in windows on a mac OS X ?

i need to make some changes to an asp.net website developed by another person - he is on a windows machine, i am using a mac. i need to make some fairly minor changes to the asp, but obviously i can't without being able to at least run the project, and hopefully open it in some development environment (although i'm not adverse to doing ...

How to embed stream content that Windows Media Player supports in a web page that works in Mac OS?

I have HTML page where windows media player is embedded. It works very well in all browsers on Windows, but when trying to open in Firefox on Mac OS, it fails to open. Is there any alternative method which can be controlled using Javascript or HTML or do I have to install Window Media Player support for Mac OS? ...

Determine current Mac Safari web page using Python

Is there a way to determine programmatically, using Python, which web page is currently active in Safari? ...

Shared httpd.conf

I'm trying to share a single httpd.conf file across multiple OS X machines. I'm using Dropbox to manage the file and make it available to both machines. The problem I'm having is that the httpd.conf file has to load virtual host config files from a location within my home directory and the path is different on each machine. I tried refe...

Applescript conversion to Bash

I would like to make sure that an applescript can be converted to bash. Are there any ideas on how to do this? And if so, I'll place a simple applescript below to give you an example of how the script runs. In more clarity, I simply want a bash script or shell script to do what my applescript is doing. I want it to "enable" or change the...