osx

How can a Perl script know its own memory footprint?

I have a long running Perl script and I'd like to let it know (and report) how much memory it is using. I'd like to have this information both on Linux and Windows and if possible on Mac OS X as well. ...

using frameworks in a command line tool

I've built a command-line utility (Foundation tool) in Xcode, using Cocoa. The tool makes use of a 3rd party framework. Everything works OK in Xcode, but how do I deploy this program? If I run the app from Finder, it can't find the library because it's looking in "../Frameworks/etc." Can I statically link in the 3rd party framework? ...

detecting fullscreen on mac

I am writing an IM client for Mac (in python, but an Objective C / Cocoa solution here is fine). I want to detect whether or not the user is currently watching a movie or playing a game in the foreground, or doing anything else that takes up the entire screen. If so, I won't play a sound when a new IM comes in, but if not, I will play th...

Interfacing Java and Quartz Composer

Hi there, I have written this event photography application that features a slideshow among other things. The application written in Java and is multi-platform. However on Mac OS X, it takes advantage of the graphics abilities of Quartz Composer by including a QC component in a Java window. The component is based on the sample that come...

Complete solution for writing Mac OS X application in C++

I am looking for alternatives for my current box and Mac OS X seems very appealing. My main area of interest is C++ programming. Currently I'm using Eclipse + CDT and g++ for creating my software; sometimes it is KDevelop. I know that primary IDE for Mac is Xcode and primary language is Objective-C. I would like to avoid learning Objec...

SWT DropTargetListener has empty event data under Mac OS X

I'm currently experiencing a weird platform inconsistency between Mac OS X and Windows/Linux. I've implemented an SWT DropTargetListener and tried to analyze the data dropped in the dragEnter method. Unfortunately, the data attribute of the TransferData contained in the DropTargetEvent parameter is always null on OS X (but becomes valid...

How can I link a dynamic library in x-code?

I am currently developing a program in Qt and it uses the library libqextserialport.1.dylib. I build it and run in x-code and it spits back: dyld: Library not loaded: libqextserialport.1.dylib Referenced from: /Users/samuelreh/Desktop/QtOpenCV/build/Debug/QtOpenCV.app/Contents/MacOS/QtOpenCV Reason: image not found The libra...

Video capture on MacOS

Hi to all! i've a problem with openCV library under MacOs 10.4. When I try to execute this row to save some frame captured from webcam CvVideoWriter *writer = cvCreateVideoWriter( "out.avi", CV_FOURCC('M','J','P','G'), fps, ...

Running a script when a Mac package is executed

I have a Mac OS X application in the standard .app format and was wondering what is the easiest way to have a small script execute before the main program does. Is that possible? Edit: I only want to run the script once, so if I can set a flag or something after it runs that would be great! Second Edit: I do not have the XCode projec...

XCode crashes on startup

When I startup Xcode I get the following error: The application Xcode quite unexpectedly. Clicking on the Report... button gives the following: Process: Xcode [875] Path: /Developer/Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.Xcode Version: ??? (???) Build Info: DevToolsIDE-921...

Starting PackageMaker from Spotlight

Why does Spotlight not allow me to start PackageMaker, although it allow me to start Xcode and Dashcode, which are in the same folder? Any good guides to fixing/modifying this behavior? ...

Inspect contents of a basic, unencrypted UDIF DMG file

If I mount the DMG file using system calls to hdiutil and my application quits unexpectedly, the DMG remains mounted but because I mount it privately with -nobrowse, it doesn't show up in Finder. Is there a way to mount it using some framework or API that will be smart enough to unmount if my application unexpectedly quits? Basically, I...

Using PackageMaker to run a script on install

I have an app I need to create an installer for, and all the installer needs to do (besides copying the app) is run a script (or executable) that is not part of the app itself. Any help on how I can do this? I see in the Requirements tab there is a Results of Script action, and there is also the Preinstall Actions in the Actions tab whic...

POSIX Semaphores on Mac OS X: sem_timedwait alternative

I am trying to port a project (from linux) that uses Semaphores to Mac OS X however some of the posix semaphores are not implemented on Mac OS X The one that I hit in this port is sem_timedwait() I don't know much about semaphores but from the man pages sem_wait() seems to be close to sem_timedwait and it is implemented From the man p...

Setting up a one-time installer using Apple's PackageMaker

I'm a newbie at this so I'll explain what I did so far: Open PackageMaker and drag my MyApp from /Applications into the left sidebar Changed the owner/group for MyApp to root/admin and rwxrwxr-x Created a postinstall shell script and selected it in the Scripts tab So now, how do I add that executable (Adobe AIR Installer) that I wa...

[IDE] Intellij IDEA on Mac: Reformat Code does not work

Hi, I can't seem to get "Reformat Code" to work on my mac version of Intellij. I'm using a 30 day trial. Update & Clarification; It doesn't do anything, there is no reformatting done at all. Thanks ...

How to dectect new or modified files in Mac OSX

In Windows OS, MS provides ReadDirectoryChangesW and FindFirstChangeNotification API to dectect new or modified file, does the Mac OSX provide equal function as well? ...

Can Mac have more than one client using its desktop?

I have one Server Mac OSX and have 5 windows PC's in my team. So I have this program on the MAC but I want two users in my team to be able to use this program, is there any way more than one person can VNC or remote desktop or something to the MAC server? Then those two users could both use the program on the mac server. I would need t...

How should I remove all items from an NSTableView controlled by NSArrayController?

I'm using an NSArrayController, NSMutableArray and NSTableView to show a list of my own custom objects (although this question probably applies if you're just showing a list of vanilla NSString objects too). At various points in time, I need to clear out my array and refresh the data from my data source. However, just calling removeAll...

How to isolate causes of system hang on Unix/OSX

I am on OSX, and my system is becoming unresponsive for a few seconds roughly every 10 minutes. (It gives me the spinning beach ball of death). I was wondering if there was any way I could isolate the problem (I have plenty of RAM, and there are no pageouts/thrashing). Any Unix/OSX tools that could help me monitor and isolate the cause o...