osx

OS X Process control

I'm writing a process-controller kernel extension for leopard. The application enables me to suspend process's with SIGSUS and to make the computer sleep. My problem is when an application that uses video / audio (e.g iTunes or GarageBand) is suspended and then I try to make the computer sleep, the sleep process waits on the audio / vide...

MacPorts doesn't install org.macports.mysql5.plist with mysql5 +server

The last two times I've used MacPorts to install mysql5 +server, the plist isn't installed that allows me to have MySQL start on launch. I can't remember what, if anything, I did the on the last install and I can't seem to find a way to get it installed. Am I missing something? How can I either get the plist file (the only way I know of ...

osx 'mount' local directory

is it possible to mount a local directory into another one. Using perfoce I want to do something equivalent to symlinking a directory, but in a way that fools it into thinking it's really just another directory in the project. I would like to do something like: mount /foo/bar /home/foo/bar Is this possible, and if so what options...

Check whether application already running

Hi all, I am developing an application in cocoa,which needs to check whether that app is already running at start up.If already running then i need to quit the new instance ..Is there any way to do this..Looking for a perfect solution ...

Undecorate JInternalFrame on MacOS

I am trying to undecorate a JInternalFrame, i.e. remove the default titlebar using the following code; BasicInternalFrameUI ui = (BasicInternalFrameUI)internalFrame.getUI(); ui.getNorthPane().setPrefrredSize(new Dimension(0,0)); I works on windows but the second line throws a NullPointerException on MacOS Any ideas why and how to get...

AppleScript: How can I quit all running user apps and then restart to bootcamp partition (this part works)?

Hi, I frequently reboot into Windows on a bootcamp partition in my Mac Pro (e2008) (Mac Os X 10.5.6). Because I like to use the time it takes to reboot for other things instead of just sitting around I'd like to write/execute a simple applescript that would basically do: Quit all running user applications Then*—after the apps have bee...

Keyboard input on any Java 6 application on OSX Leopard

I get no keyboard feedback on any java application I run with Java 6 (64-bit) on OSX Leopard 10.5.7. It happens with any swing application, or even with eclipse 3.5 64-bit (which is a SWT-cocoa application). Did't find any reference to this problem on the web... ...

Best Programmer's Image Editor for OSX

I'm looking for recommendations for a programmer's image editor for OSX. I'm looking for something for preparing images for use in software and web applications - I'm not a graphic designer. On Windows I'd use Paint.NET. GIMP is not the answer (flakey and a disaster with Spaces) Must haves crop, resize canvas etc resample, bicubic ...

Putting an NSPopUpButton in an NSToolbar

Having wrestled with NSPopUpButton in a previous question here I am now trying to place a NSPopUpButton inside an NSToolbar. Essentially I want to create something similar to what XCode has by default on the left hand side of it's toolbar. E.g. a pop up button with an action button next to it. I have seen a method that show's a programm...

How do I determine the target architecture of static library (.a) on Mac OS X?

I'm interested in verifying if a given iPhone static library has been built for ARM or Intel. Its more curiosity than anything. Is there some kind of Mac OS X or BSD specific tool to do this? This post gives an example in Linux. ...

How to get language locale of the user in Objective-C?

I develop an application for MacOSX. Therefore I want to change indication contents by the language locale (English, Spanish, etc.) of the application user, How to get information which language use ? I'm happy , If you give me some example codes ...

IPython OS X: Up arrow gives "^[[A"

Hi, Whenever I hit the up arrow in IPython, instead of getting history, I get this set of characters "^[[A" (not including the quotes). Hitting the down arrow gives "^[[B", and tab completion doesn't work (just enters a tab). How can I fix this? It happens in both Terminal and iTerm. Running OS X 10.5, Framework Python 2.5.4. Error...

Profiling native methods in Java - strange results

I have been using Yourkit 8.0 to profile a mathematically-intensive application running under Mac OS X (10.5.7, Apple JDK 1.6.0_06-b06-57), and have noticed some strange behavior in the CPU profiling results. For instance - I did a profiling run using sampling, which reported that 40% of the application's 10-minute runtime was spent in ...

Programmatically Change System Network (Proxy) settings

Hello. Is there a way, from within a Cocoa application to change the system network settings (specifically, the proxy settings). I've found that there is a file called preferences.plist in /Library/Preferences/SystemConfiguration that has the settings I want, but I can't figure out how to get the system to process changes to this file ...

Java 1.6 Applet and Mac OS X, is there an official issue here?

I'm developing an applet in Java 1.6 which is supposed (ofcourse) to run on Mac and PC. However people with Mac seems to all have Java 1.5 installed even due they keep thier software updated with the Mac update tool. This seems very strange to me that Java isn't automatically updated by Apple as Java 1.6 was released in 2006. Is there...

Send Apple Event from Windows?

My son has a MacOS 9 box to which he is sending remote AppleEvents from his Leopard-based MacBook. Is there any way, programmatically, that I can send remote AppleEvents via TCP/IP from my Windows 7 Toshiba? ...

What options are there for GLSL shader development on OS X?

Apple's Shader Builder is not terribly advanced. I was wondering if there are any better choices for OS X other than running something under bootcamp. ...

Java 6 Update - Mac OS X application crash related to QuickTime libraries

I currently am looking at a bug related to an application crash when running on Mac OS X. The crash only seems to occur when using Java 6, with the Mac OS X 10.5 Update 1 (64 bit mode). The problem does not show up on 32bit Mac Java installs. From what I have read via google, the issue seems to be related to the fact that the applicatio...

Problem with gprof on OS X: [program] is not of the host architecture

I'm having trouble running gprof on OS X. The file test.c is: #include <stdio.h> int main() { printf("Hello, World!\n"); return 0; } and my terminal looks like: $ gcc -pg test.c $ gcc -pg -o test test.c $ ./test Hello, World! $ gprof test gprof: file: test is not of the host architecture Edit: also, it doesn't generate the fil...

How do you use any2mobi command line tool (part of Calibre) to make mobi files from HTML?

I am on MAC OS X 10.5.5. I installed Calibre, a tool for converting e-book files from one format to another. It has a GUI as well as command line tools. I am trying to run the command line tool "any2mobi" to convert HTML files to MOBI pocket format or Kindle AZW format, with a TOC. I get the error "-bash: any2mobi: command not found". C...