osx

Increase memory for shared memory

Hi there! Actually when trying to get shared memory, shmget() often fails with because being unable to allocate memory. The physical size of RAM really shouldn't be the problem (4GB is enough, I think). Rather there's probably anywhere in the systems properties a limit for allocating shared memory set. Does anyone know, where I can fin...

Postgresql not working with ruby on rails on mac os x

Hi, I just switched to mac, I was previously working on Linux. I am trying to use posgresql for my project When I start the server, it works fine. Nevertheless when I use rake:db:migrate, it fails saying: Please install the postgresql adapter: gem install activerecord-postgresql-adapter (no such file to load -- pg) I have the gem "pg...

Java-Mac OS X integration without breaking platform independence

I want my application to integrate Mac OS X better. I've read Mac OS X Integration for Java and I've learned I have to import com.apple.eawt.* and write some extra code. But, if I do this, my application is not going to work on Windows because of missing reference. I could do this with preprocessor command if I write in C but this is Jav...

As an OSX beginner, what are my options for writing an application that processes iCal data?

Hey guys, quick background: I'm a .NET developer, mainly Web, but with some experience in old skool VBA, WinForms, some WPF, and a lot of Services. I've now bought a new Mac (Snow Leopard), and loving it, and have my first need for a custom "app". I don't need explicit instructions on how to build this app, but I need a starting poin...

OS/X mimetype handler

I'd like to write a small script that implements RFC4709 for OS/X. I started off by creating an application bundle that registers the application/xml+davmount mimetype and launches a simple python script. It doesn't make a lot of sense to me to make this a .app bundle, because the application is very short-lived, and it also doesn't se...

RDC sessions to Win 7 terminate on CTR and arrow keys

I am trying to do a Remote Desktop Connection (RDC) from my Powerbook G4 (OSX 10.5.8) to a Windows 7 machine. The connection is established without any issues and the remote destop is displayed properly. However, hitting CTR or one of the arrow keys terminates the RDC session which is very annoying as you can imagine. Any ideas on how ...

How do i make iis my main web server within parallels desktop whislt doing the development osx side?

I currently own an iMac but do allot of asp.net based development in Parallels Desktop.How do i make iis my main web server within parallels desktop whilst doing the development osx side? I hope that makes sense ...

How to write OSX finder new functionality/view

Hi, I am new to Mac programming and I wan't to make a sort of plugin that change the standart view of files in Finder and add some custom buttons. Any idea how can I accomplish it or where to start? Thanks a lot, Adam ...

Time Machine API / Command-line scripts ?

Hello! I need the reference, if it exists, to Time Machine's API or simply some commands that can change the disk in use with Time Machine and back! I'd like the script I'm going to write to do the following: Change from disk A to disk B Force Time Machine backup Change from disk B back to disk A Thank you! ...

Programmatically open PrefPane with section

Hi All I need to open the network-prefpane in my App. This works fine with [[NSWorkspace sharedWorkspace] openFile:@"/Path/To/PrefPane"]; But how can i directly open the "proxy-settings", which is in the "network-pref" under "advanced"? You can see this in the Safari-Settings under "Advanced->Proxies" Thanks ...

Debugging Thunderbird on Mac OS X with GDB

Hi guys! I tried today to find a bug in Thunderbird, or more specifically - the location where it crashes ( the Crash reporter jumps in ). However when I try to run it in gdb, the program immediately exits with code 06. And then the Crash reporter springs into action again. This way, I can never get to the actual point where it dies. I...

How to replace old ParamText/StandartAlert with newer CFString replacements?

ParamText() is an really old way of replacing parameters in a string that is based on Pascal strings. Also StandardAlert is not quite Unicode ready. The new message box (not so new) replacement is CFUserNotificationDisplayNotice but this one expects CFString and I found out that if I'm about to switch to using CFString I'm not able to u...

Why doesn't this keyboard intercepting kernel extension work?

Hello, my fellow developers! I hope very much that at least some of you will not get frightened by the amount of text this question contains (I simply did my best to be as descriptive as humanely possible). :) To those who think I've asked this question to write malware or something. I want to write an application that will allow users ...

Twisted for Snow Leopard?

The Twisted download page shows that the current version for Macintosh is 8.2.0 for OS X 10.5 Are there known issues with this version of Twisted under 10.6, or is the Twisted web page just a bit out of date? ...

Easiest way to simulate no free disk space situation?

I need to test my web app in a scenario where there’s no disk space remaining, i.e. I cannot write any more files. But I don’t want to fill my hard drive with junk just to make sure there’s really no space left. What I want is to simulate this situation withing a particular process (actually, a PHP app). Indeed, temporarily prohibiting ...

How can I exit [NSRunLoop runUntilDate]?

Hi everyone, I am writing an application which has to communicate with a device connected via USB. The app sends and receives data in turns from the device on a fixed timing. All Rx/Tx happens in a separate thread because otherwise the UI would be blocked. The basic structure looks basically like this. (autorelease pools and stuff omitt...

Determining the pixel length of a string in Cocoa (MAC OSX)

I need to figure out the pixel length of an NSString in Cocoa on OSX and I have found a couple of links that describe how to do this using the IPhone sdk but I didn't see anything about how to do this when not targeting the IPhone. Can anyone link me to some docs that would be relevant. I did find anything in the NSString docs. ...

How can I get the filesystem page size from unix/linux/osx and windows?

I want to be able to determine at runtime what the sector size is for a give filesystem. C code is acceptable. for example I format my Data partitions with a 32k sector size that have lots of large video files. I want to be able to get this value at runtime. ...

Is there any way to force TextMate to cache files?

I'm working with a Rails project over an AFP mount in TextMate. Every time TextMate becomes the active window, it spins for around 30s-1m, which is VERY frustrating. I've sampled TextMate when this is happening, and found multiple calls to +[NSFileAttributes _attributesAtPath:partialReturn:filterResourceFork:error:] to be the issue. Is t...

record output sound in python

i want to programatically record sound coming out of my laptop in python. i found PyAudio and came up with the following program that accomplishes the task: import pyaudio, wave, sys chunk = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100 RECORD_SECONDS = 5 WAVE_OUTPUT_FILENAME = sys.argv[1] p = pyaudio.PyAudio() channel_map ...