mac

Where can I find a list of Mac virtual key codes?

I'm using CGEventCreateKeyboardEvent and need to know what value to use for the CGKeyCode. Specifically, I am after the key code for the Command key (either of them will do). The docs give examples: 'z' is 6, shift is 56. There must be a list somewhere? ...

Why flash on Mac does not display font correctly?

We have standard flex 3 project, and We have left everything as default, no change in style at all, and we deployed our project and noticed that on Mac the character spacing is very bad and overall look and feel is not as clear as that of windows. Here is the difference, left one is Windows and right one is Mac.. the default flex font c...

Programming a USB Device on a Mac

I'm updating some old old code (that works for now, but is using OpenTransport, so um... no) that interfaces with a USB scanner. I THINK I understand how IOUSBDeviceInterface and IOUSBInterfaceInterface are supposed to work, but I can't seem to get information about the pipes. I have a method which takes: (IOUSBInterfaceInterface **)int...

register for WindowServer CGScreenRefreshCallback CGScreenUpdateMoveCallback in C++

Hi everybody, I'm trying to register for CGScreenRefreshCallback and CGScreenUpdateMoveCallback ( here's what apple's saying about http://developer.apple.com/mac/library/documentation/GraphicsImaging/Reference/Quartz_Services_Ref/Reference/reference.html#//apple_ref/doc/uid/TP30001070-CH1g-F16970 ) using C++ only. I wrote this simple te...

Reading a File on OS X via Java - Is my path correct?

I am trying to do this File file = new File("/Users/Jon/Downloads/mynewalbum/artist - title.mp3"); I don't think its correct though as the properties returned don't seem correct. Maybe I have got a backslash or something wrong? ...

Get Mac idle time C or Python

How can i get system idle time (no keys pressed - mouse moved) in C or Python? EDIT: My program suspend a counter when idle time > 10 sec ...

Mac source control option with both working and live repositories being remote?

I've been doing LAMP development for roughly ten years now. I've occasionally used CVS and SVN. I code mostly with BBEdit. I am trying to setup some sort of source control to manage LAMP web apps. I prefer not to have a local repository. I usually have a dev server and a live server. I am looking for a source control option that will wo...

How to get volume data from an input device in Core-Audio?

I am trying to get the volume of the audio heard by an input device using Core-Audio. So far I have used AudioDeviceAddIOProc and AudioDeviceStart with my AudioDeviceIOProc function to get the input data in the form of an AudioBufferList containing AudioBuffers. How do I get the volume of the data from the AudioBuffer? Or am I going ab...

If I want to write an iPad app, do I have to buy an iPad?

To program for the iPhone, you need an iPhone. That's because you have to compile the final version of the app on the iPhone hardware. Do you also need an iPad when you program for the iPad? Or will an iPhone also do the job? ...

Error accessing tomcat web server from my mac

Hi, support guys in the office can't help and everything has been fine for the last couple months until today. Running OSX 10.6.3 and 1 of only 2 users on mac. Can access a staging server when remoting in to a pc near my desk but not able to access via any of the browsers on my mac (Chrome, Firefox or Safari). An example staging server ...

How do I get NSAssert to either crash the application or at least bring up an error dialog?

Hi, I use asserts quite a bit in my code since they are useful in debugging, but the standard behaviour of Cocoa applications is to interrupt processing and logging the assertion failure to the console.. the UI stays up neither crashing, nor bringing up an error dialog and it's often not obvious what has happened. What's the easiest wa...

mac version control software?

anyone know any good mac version control software? if so why is do you reccomend it, dont mind paying a little money for the software edit: thanks everyone for the information so its come down to Mercurial vs SubVersionsapp (SVN) ...

Startup Items - Creating a basic one

Hello Everyone! Please save me from a potential nervous breakdown! I've been following Apples documentation (see below) on how to create a Startup Item. Currently I'm just trying to get my script to print something to the console, much less actually run my app. Here are my two scripts, one is the startup executable, the other is the p...

Is it better to develop on Mac or Windows ?

I have noticed a lot of developer these day developing on Macs. I have never use one for an extended period of time or to develop. I was thinking of investing in one for programming purposes but don't have sufficient knowledge in pros/cons of developing on Mac OS X or Windows. I was hoping you all could help provide guidance as to which ...

What's the UTTypeIdentifier for Safari Extension files? .safariextz

You know, like com.apple.safari.bookmark for Safari Bookmarks, or com.apple.ical.ics for iCal calendars. Thanks. ...

Does Apple support Java 6 yet?

A while back I released an application in Java. While I targetted it for Java 6, I realized that there was a significant Macintosh user base. At the time, Apple had not gotten around to creating a JRE 6 for their users, so I had to make the application compatible with both Java 5 and 6. Now I've returned to that project and realize tha...

How do I detect if a drag operation was cancelled using NSDraggingInfo or similar?

I've created a subclass of NSImageView and implemented the informal protocol for dragging images between other instances of the same class. I am keeping a reference to the image of the view prior to the dragging operation and am able to set it back to said image given certain criteria. However, I can't seem to detect if the dragging ope...

Automate Spreadsheet Transformations

Hello, Every month I process a vendor's MS Excel spreadsheet for my work. I have to remove columns, rename columns, re-format columns, and then email the resulting spreadsheet to colleagues. Is there a way, in Excel or Numbers or programmatically, to automate this extremely repetitive process? Thanks, Sergio ...

How to Crop image to the maximum image rect?

Hi, In Mac OSX, I have an image with black pixel in all 4 directions. I want to programmatically crop the image to the maximum image rect. Should i check for the black pixel and then create the crop rect or is there any supported API is there? ...

Resize native window

Hi Does anyone know of a cross-platform way to resize a native window - by native i mean one that runs inside of Windows', Mac's or Linux's windowing toolkit? Any help would be appreciated! ...