osx

know the position of the finger in the trackpad under Mac OS X

Hello, I am developping an Mac application and I would like to know the position of the finger in the trackpad when there is a touch. Is it something possible and if yes, do you have any idea to achieve this? Thanks in advance for your help, Regards, ...

What is the best way to display a list using Cocoa?

The iPhone has the UITableView for displaying lists and information, what is the best way to display the same type of lists using Cocoa for an OSX application? I'm trying to convert one of my iPhone apps to the desktop using Cocoa, but having a hard time finding the same type of list view. Thanks for any help in advance! ...

Visually distinguishing between local and remote Terminal sessions

I'm using Terminal under OS X quite extensively. I find quite annoying (and a bit dangerous, too) that my local and remote sessions look exactly the same in the Terminal. I'm wondering if it's possible - maybe through a bit of bash-programming - to clearly distinguish between local and remote sessions. A different background color would...

Why can't my CPAN client from MacPorts find Module::Build?

I am using the macports in snow leopard. I wanted to install certain perl modules to be able to run a script. The DateTime module to be exact. How do I do this? I tried using the following command. perl -MCPAN -e shell cpan > install DateTime But it still says that DateTime.pm not found. What have I done wrong? Edit: I think I have ...

What's the proper way to safely run this error-prone system call in perl?

So as part of a startup script for OS X computer lab systems, I am running a built-in shell command called systemsetup to sync the system with a network time server. It's running inside a perl script as follows. #!/usr/bin/perl system("systemsetup -setusingnetworktime off"); system("systemsetup -setusingnetworktime on"); Flipping it ...

Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000 Error

Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000 What is Kernel protection error? Where can i find the details about Exception type and code clearly? ...

How to access dropped files in a droplet style cocoa application

Pretty much all the apps I use on a regular basis implement this 'seemly simple' scenario, yet I can't replicate this in my own Cocoa application. Please consider these steps: The application is not running You drop a file, or a selection of files onto the app's icon. The app runs and performs some actions on the dropped files. Maybe i...

Is NSWindow setLevel:NSFloatingWindowLevel broken in OS X 10.6.x

We're trying to get a NSWindow or NSPanel to be always on top on OS X 10.6.x. We've seen many suggestions that setLevel:NSFloatingWindowLevel should do the trick (some say it must be a NSPanel for it to stay on top). However, we are using 10.6.4. and the window keeps disappearing to the background when the app looses focus. I've seen o...

what's the best way to get etherpad to launch on startup on OSX

I think launchd is the answer, but using this plist: http://gist.github.com/553573 I get this error: Exception in thread "main" java.lang.NoClassDefFoundError: net/appjet/oui/main Caused by: java.lang.ClassNotFoundException: net.appjet.oui.main at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessCo...

Could not find class: org.junit.tests.AllTests - OSX

Hi. I'm having a little trouble getting started with JUnit tests. This should be pretty basic. I downloaded junit-4.8.2.jar from JUnit.org and placed it in my home directory. If I try to test my setup in a TCSH terminal with the following command: java -cp ~/junit-4.8.2.jar org.junit.runner.JUnitCore org.junit.tests.AllTests I recei...

Application behaves differently when output is redirected to an NSPipe object?

I have an application which works with sockets and reads / writes data. It uses Foundation framework combined with CFNetwork and stdio. Here is the issue - when it is launched from console (bash shell) it works 100% fine and there is nothing wrong with. However when it is invoked by another application via NSTask madness begins. The who...

Running mysqltuner on Mac OSX

I use Zend Server CE on my Mac running OSX Snow Leopard for my development environment. I need to tune up MySQL and have used mysqltuner.pl in the past on Linux servers to do pre- and post-testing. I downloaded the script and get the following errors when I run it: couldn't find diagnostic data in /System/Library/Perl/5.10.0/pods/pe...

DarwinPorts or Fink?

This is an eternal question; however the comments I've found about this date of 2008, and I guess have moved since then. So, DarwinPorts or Fink? (or something else?) I see that Fink does not yet have a binary installer for snow leopard... is it a dead project? Regards, David ...

iTunes Scripting Bridge - How to play a specific track

I am writing a mac application that uses the scripting bridge to control iTunes. I have generated the header file iTunes.h, and the SBApplication object can tell me all kinds of wonderful things. However, the commands seem very limited. There is a 'playpause' function, but I see no way to do this // iTunes is my SBApplication Object [i...

make openssh on MAC OSX and problem with libcrypto

I need to compile openssh for leopard (10.5) on 10.6. but openssh has a dynamic link to libcrypto.0.9.8 which is not available on Leopard 10.5. The leopard version is 0.9.7. but somehow I can't link directly to 0.9.7. When I copy the 0.9.7 version to the root of openssh source, It doesn't compile. Currently I'm building with these flags...

Be notified when a file is dropped into a folder Mac OS X

Hi I want to write a little script on my Mac. This script will basically look for new files in a particular folder, and move them to another location when some are found. So I was about to write something very basic, with an infinite loop, and I was wondering if something a bit more nice already exist ? Like a Listener or something I ...

FSEvents Modification Dates

I am aware that you can track when the contents of a folder have been modified while your application is not open on OS X with FSEvents, but it is difficult checking the modification date of every file in the directory when the application launches. Is there a way to change FSEvents or is there another mechanism to tell what files have b...

How can I implement cooperative lightweight threading with C on Mac OS X?

I'm trying to find a lightweight cooperative threading solution to try implementing an actor model. As far as I know, the only solution is setcontext/getcontext, but the functionality is deprecated(?) by Apple. I'm confused by why they did this; however, I'm finding replacement for this. Pthreads are not an option because I need cooper...

MapKit for the desktop?

Is there a framework similar to MapKit (i.e. that can display maps with overlays) for the desktop. Apple-supported, Google or third party/open-source. I know of OpenStreetMaps, and I want to know what the options are. ...

Apache Ants sshexec task and a passphrase problem under Mac OS X

I would like to use a sshexec task in Apache Ant under Mac OS X like this: <!-- ... --> <target name="uname"> <sshexec host="${host}" keyfile="${user.home}/.ssh/id_rsa" username="${user}" command="uname -ar" /> </target> <!-- ... --> But i will only get an error "Auth cancel" for "ant uname": BUILD FAILED /build.xml:78: com.jcraf...