mac

Is there a way to have varying views in an NSCollectionView?

I am wanting something similar to how iWork has the template selection screen for Pages when you can select different templates, and each view contains different info has difference sizes etc. I have tried subclassing NSCollectionView and determining which view to display using the newItemForRepresentedObject method (as opposed to using...

Proper location to install Android SDK on Mac

Hi, What is the best (most proper) location to install the Android SDK on Mac? I've seen in some posts that somewhere in the Home directory is advantageous. Some seem to have placed the SDK in the Applications directory. Thanks very much. Prembo. ...

How do I read the cache of Chrome and Firefox programmatically on the Mac?

Background I want to access the cache of Chrome and Firefox in my Cocoa application. I need to get the HTML for pages accessed recently. Safari is a piece of cake - all this information is available in SQLite data stores, but not so in Chrome and Firefox. The Problem For Firefox, the cache is in /Library/Caches/Firefox/Profiles/xxx.de...

Python: Reliably monitor current CPU usage

I'd like to monitor the current system-wide CPU usage on a Mac with Python. I've written some code that starts 'ps', and adds up all the values from the '%cpu' column. def psColumn(colName): """Get a column of ps output as a list""" ps = subprocess.Popen(["ps", "-A", "-o", colName], stdout=subprocess.PIPE) (stdout, stderr) = ps.commu...

Xcode 3.2.2 refusing to open any project folders!?

Hi, I'm developing on a number of different machines and haven't used my laptop for a while. Today I tried to use for the first time after a couple of months only to find that Xcode steadfastedly refuses to open any .xcodeproj projects!? I ended up uninstalling the older (I think it was 3.1) Xcode installation and re-installing the lat...

Eclipse Version

How do you check the current version of eclipse that I am currently running? Is it possible to tell if it is aqua or carbon (I am running Mac OS X 10.5)? ...

Qt 4.6.x under MacOS/X: widget update performance mystery

Hi all, I'm working on a Qt-based MacOS/X audio metering application, which contains audio-metering widgets (potentially a lot of them), each of which is supposed to be updated every 50ms (i.e. at 20Hz). The program works, but when lots of meters are being updated at once, it uses up lots of CPU time and can bog down (spinny-color-whee...

Send signals over USB using cocoa?

Just wondering, is there any "API" for sending signals through a USB cable to a device using Apple's cocoa programming language, so I could incorporate it with an app? is it much more complicated than a couple of commands, or do i need a library? I have no experience with external device communication so any help is welcomed! ...

auto-run for applescript editor

Can I make an apple script that auto runs when I put in my flash drive? I want to be able to do this so that when I put my flash drive in the computer at school I can make my presentation automatically play to save time and so i don't have to go through all my files in front of the class. We use macs at school and I have a mac. ...

How can I mount a network drive in Mac OS X in Java?

Как я могу смонтировать сетевой диск в Mac OS X на Java? Пишу программу на JBuilder 2005 на XP для Mac OS X. Прога обращается к зашаренным папкам на другом компе с XP. Нужно, чтобы когда запускаем прогу на Маке, она автоматически монтировала эти зашаренные папки под Мас. и затем прога обращается к файлам на зашарен...

How can I mount network drive in Mac OS X on Java?

I am writing a programme on JBuider 2005 on Windows XP platform for Mac OS X. Programme must launch on Mac OS X and programme turnes(directs) to share folders on other computer(Windows XP) in network. It is necessary that then we launch nprogramme on Mac OS X this programme automatically mount these share folders under Mac OS X. Then pro...

PHP files are downloaded by browser instead of processed by local dev server (MAMP)

Everything was going great until I added AddHandler application/x-httpd-php5s .php to the .htaccess file in my local server's document root (which I change frequently depending on the site I'm working with). Since I did that when I visit http://localhost:8888 my browser just downloads the index.php and it's not processed at all, just the...

SO how to make MAC recognize linux BASH?

Script runs fine in Solaris and Linux just not on the crippled MAC -- thus no build environment #!/bin/bash var0=1 LIMIT=60 mkdir Application cd Application while [ "$var0" -lt "$LIMIT" ] do mkdir "$var0"; cd $var0; for i in $(seq 1 8192); do mkdir "${i}"; cd "$i"; dd if=/dev/urandom of=a bs=4096 count=1 > /dev/...

Getting problem while converting AAC to Mp3 using FFMPEG-Libavcodec

Hi Friend, I have to convert AAC file to Mp3 in my project for detecting BPM. I installed FFMPEG and i added all the library and i am not getting any compiler error but it crashes when i run the project. I am getting following error, [Session started at 2010-02-23 19:22:13 +0530.] 2010-02-23 19:22:14.641 New Decode[7170:10b] *** _NSA...

Is there anyway to compile mac binaries from a windows machine?

Seems like there wouldn't be, but it would help us out if there was. I wish to pull the source down to a windows server and compile it and have it be the same as if I had pulled the source code down to a mac machine and used xcode on it. Any Ideas? Reasons: Release Engineering and IT are much more familiar and comfortable on windows, so...

How to add multiple menu items with the same title to NSPopUpButton(NSMenu)?

As docs say it's impossible to add two menu items to NSPopUpButton if they both have the same title. I was trying to add menu items to [popupButton menu], but with no luck. I was also trying to create a new menu, add items to it and then use [popupButton setMenu:newMenu], but no. Menu always display only one item per name. But I know it...

Howto distinguish Application Quit from System Shutdown

Java on Mac OS X In a Swing GUI app I want to distinguish Application Quit from System Shutdown. On Application Quit I want to show a confirmation dialog, but when the user chooses System Shutdown I simply want to quit the app since there was already a confirmation dialog from the system. This might be of interest on other platforms...

Mac APIs or suggestions for application usage tracking

Background: This is for a university managed lab environment. Upper management wants to know how often users are using the various software we purchase for the labs. I've already implemented a solution for our Windows machines which consists of a client that tracks user process invocation and sends the results to a web service. Now I ...

How can I inform the Zoom button of Mac OSX about best fit size for a web site

Mac os-x offers a little green orb of a button in lieu of the windows maximize that is a staple in the windows world. Apparently this button is suppose to resize the window to a "best fit" In the case of our web site, it's not doing that. Is there a setting of some kind that we can use to inform the mac browser of the appropriate size...

Help with Cocoa: Objects as views?

Hi again, in my app I want to have a light table to sort photos. Basically it's just a huge view with lots of photos in it and you can drag the photos around. Photos can overlap, they don't fall into a grid like in iPhoto. So every photo needs to respond to mouse events. Do I make every photo into its own view? Or are views too expens...