mac

Mac : I want the file open dialog in an app like Xcode to open in the last-visited folder ...

... so that I do not have to browse over and over again when adding several existing files from the same or a nearby folder. Is it possible to configure this, and how/where in settings ? ...

Hide console for Tkinter app on OSX

I'm trying to hide the Terminal when I launch a GUI Tkinter based app, but when I double click the app.py file on OSX, the Terminal window appears. I've tried changing the extension to .pyw and tried launching it with /usr/bin/pythonw, but no matter what, the Terminal window still appears. I've even tried adding the try/except below,...

Position boxes like in Exposé

Hi! Does anyone know a way to locate rectangles to best fit a certain area? The rectangles can be scaled up to a certain limit, but they should keep their proportions. I basically want to rebuild Mac OS' Exposé: Picture Thanks, eWolf ...

Why does emacs in an xterm on a Mac interpret c-h as backward-delete-char ?

C-h is correctly interpreted has 'help' in Carbon Emacs.app and using /usr/bin/emacs in Terminal.app. I'm sure I'm missing something simple here. Emacs describe-bindings shows c-h is rightly mapped to help. So it seems like xterm or X11 sees a c-h keypress and then sends a backspace to emacs. Can this behavior be changed? ...

Printing to IP receipt printer from ruby

Want to send text to a network receipt printer using ruby. I know the IP address of the printer. The printer is accessible through the network, but it is not directly connected to the computer. I'm using a Star TSP100LAN, but I'm sure it would be using the same protocol as other receipt printers. ...

Graphical interface for Graphiz for Mac OS?

I installed the Graphviz GUI from pizelmap.com, but it appears to only be a viewer for .dot Graphviz files. I am looking for a graphical editor, where I can create diagrams by pointing and clicking--just like the iPhone app Instaviz. I would rather not code graphs by hand. Does anyone know of anything--preferably free? ...

New iMac - New Rails Environment - Dropbox - Permission Problem...

Ok, I just bought the new 27 inch iMac and I am trying get everything set up. I am new to rails and have been developing on my MacBook Pro and seem to be having some trouble sharing my applications. I use dropbox which allowed me to easily access the new files from my new iMac and therefore my rails applications but after installing rail...

How to obtain codesigned application certificate info

Hi folks, I am having a tough time finding an answer to my codesigning issues. We have an application for Mac OS written under Cocoa. Finally - we did our codesigning, but i would like to add an extra security check - within the executable itself. My idea is to validate the fingerprint of the certificate with which the current executa...

Help needed on font for localized string

Hi, My client has given me a custom TTF font only for English. So my intention is to load that TTF only for English and for other languages it should fallback to the available System font. I am doing the following steps: Registering fonts with my app. Copying into Resources folder and add to my project. Loading the font with name. N...

Clicking the mouse down to drag objects on Mac

I've been using the following code to issue clicks programmatically on a Mac void PostMouseEvent(CGMouseButton button, CGEventType type, const CGPoint point) { CGEventRef theEvent = CGEventCreateMouseEvent(NULL, type, point, button); CGEventSetType(theEvent, type); CGEventPost(kCGHIDEventTap, theEvent); CFRelease(theEve...

New to mac development - where should I begin?

Hi I am new to mac development (I've been into iPhone dev so have a good idea of Objective-C). I want to create a simple application which gets/shows data to the user and uses SQL to save the data. Any sample apps that I came across are either Core Data apps or Document-based apps. Document based apps are definitely not what I want. Bu...

Check if Mac process is running using Bash by process name

How do you check if a process on Mac OS X is running using the process's name in a Bash script? I am trying to write a Bash script that will restart a process if it has stopped but do nothing if it is still running. ...

Sending mail from bash shell script.

I am writing a bash shell script for Mac that sends email notification by opening an automator application that sends email out with the default mail account in Mail.app. The automator application also attaches a text file that the script has written to. The problems with this solution are It is visible in the GUI when sending It steal...

Why does Mac OS sometimes launch the wrong binary when I click on a .app

I created this application that contains several binary files (let's say X, Y and Z). I have a .plist file that specifies that the application should launch X when opened. Everything works fine 99.9% of the time but sometimes, it launches another binary (Y or Z). This usually happens after something crashed in my application so I am gue...

NoClassDefFoundError: javax/swing/GroupLayout$Group on Mac Computer

I am having a runtime error ONLY when I test my Java program on a mac computer. It tests perfectly fine on various Windows operating systems. This is the error message I get on a Mac computer... Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/swing/GroupLayout$Group at project.MainPanel.calculateButton...

Testing web application on Mac/Safari when I don't own a Mac

Having been caught out recently when a web site I launched displayed perfectly on IE, Firefox, Chrome and Safari on Windows but was corrupted when viewed using Safari on the Mac (by a potential customer), I need to start testing how my sites look when viewed on a Mac. Problem is, I don't own a Mac. I've tried BrowsrCamp, which claims...

Can python send text to the Mac clipboard

I'd like my python program to place some text in the Mac clipboard. Is this possible? ...

Unable to start MySQL from the terminal

I am quite new to the Macintosh, I have Mac OS 10.6 installed. I downloaded the mysql-5.4.3-beta-osx10.5-x86.dmg file and installed all the files properly. I have got MySQL server started in system preferences. Now I want to access MySQL from the terminal but I am unable to do it. I have tried mysql -u root. It shows "-bash: mysql: ...

Awk strftime on Mac OS X

The following command on my Mac (10.6) gives me an undefined function error: $ awk 'BEGIN{now=strftime("%D", systime()); print now}' awk: calling undefined function strftime source line number 1 On a Red Hat system, I get the expected result: $ awk 'BEGIN{now=strftime("%D", systime()); print now}' 12/01/09 What's the deal here? ...

Setting a boolean property in Info.plist from a User Defined Setting

It's simple to set a property in an Info.plist file from a user defined setting, you just use ${YOUR_SETTING_NAME} as the value. However, is it possible to do this for a bolean property? The structure in the plist file for a boolean is: <key>NSAppleScriptEnabled</key> <false/> It's not clear how to use a user defined setting here. ...