mac

How can I programmatically remove a page from a pdf document on a Mac?

Hi, I have a bunch of pdf documents and all of them contain a title page that I want to remove. Is there a way to programmatically remove them? Most of the pdf utilities I found can only combine documents but not remove pages. In the print dialog I can choose page 2 to and then print to a file, but I can't find anyway to access this fu...

How to uninstall Python 2.7 on a Mac OS X 10.6.4?

I want to completely remove Python 2.7 from my Mac OS X 10.6.4. I managed to remove the entry from the PATH variable by reverting my .bash_profile. But I also want to remove all directories, files, symlinks, and entries that got installed by the Python 2.7 install package. I've got the install package from http://www.python.org/. What di...

Where the application should store its logs in Mac OS?

I'm porting a Windows app written in C# to Mac OS using Java and Swing. The Windows app stores the logs (environment info, exceptions, etc.) in the file C:\Program Files\MyProgram\Logs\app.log. Occasionally I ask users to send me this file to diagnose problems. What is the right place for logs in Mac OS? If there are several possible ...

Compile Python 2.5.5 on OS X 10.6

I would like to install Python 2.5.5 to use with Google apps but have been having a very hard time tracking down instructions on how to do so. I am thinking the following might work but was wondering if anyone had successfully built it? ./configure --prefix=/usr/local/python2.5.5 MACOSX_DEPLOYMENT_TARGET=10.6 --enable-framework --with-u...

php debugging on a Mac?

Hi, I've seen these answers: http://stackoverflow.com/questions/1693677/debugging-php-on-mac but I am hoping that there is a better/newer solution. I am a system-level developer (C/C++/x86) but totally new to the web/scripting space. I feel that I would do well do setup a solid debugging environment - it is usually a great way for me...

How to get content from URL asynchronously?

I'm trying here to create NSXMLParser from content of URL, it work perfectly well but is there way I can make URL content to be received asynchronously and later create NSXMLParser? NSURL *url = [[NSURL alloc] initWithString: @"http://www.Xmlfile.com"]; NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:url]; [url release]...

Save and restore applications and layout

I'm looking for ways to reduce the wasted time spent to open all the applications needed, position windows, open urls/files/change directories/etc. before actual coding starts. In the perfect world there would be 2 buttons marked 'SAVE STATE' and 'RESTORE STATE' per 'project'. The kind of feature you find in some games. I'm on a mac an...

Sound balance keeps jumping

I'm using AudioHardwareServiceSetPropertyData to set the master volume. I'm using the following: AudioObjectPropertyAddress propertyAOPA; propertyAOPA.mElement = kAudioObjectPropertyElementMaster; propertyAOPA.mScope = kAudioDevicePropertyScopeOutput; The problem I'm facing now is that, the sound volume can be set properly in my app, ...

NSManagedObjectContext save causes NSTextField to lose focus

This is a really strange problem I'm seeing in my app. I have an NSTextField bound to an attribute of an NSManagedObject, but whenever the object is saved the textfield loses focus. I'm continuously updating the value of the binding, so this is far from ideal. Has anyone seen anything like this before, and (hopefully) found a solution? ...

Does anyone have a description of the return codes from libusb on Mac OS X?

I am trying to debug a libusb-based driver that work just fine on Linux and Windows, but fail on Mac OS X. However I am unable to find a description of the return codes from libusb. ...

Inline heading with background color using @font-face - not working on Mac in either Safari or FF

I have an inline heading (h1) with a background-color on the heading, but on Mac OS in both safari and Firefox it does not seem to stretch around the font. With a websafe font it works fine. Line height is set according to the font-size. Any suggestions? See visual expamle: http://www.flickr.com/photos/hegerokenes/5038724235/ @font-f...

Browser for Mac using WebView

I'm making a really simple Browser for Mac OS X but I've encountered a problem. I sign in to Facebook and select the box "Remember me", but when I restart my app I have to sign in again. At the moment it is just a WebView in the main window and on load I tell it to load http://www.facebook.com So, how I do to make "Remember me" work? ...

svn update on server using ssh terminal command

Hello, I'm new to subversion, and of course, ssh. I'm using Mac's 'versions' app, to 'commit' changes to a repository. From there, using my mac terminal, i've doing the following: ssh [email protected] it then prompts me for password, and i proceed by inputting pswrd once connected, i input: svn update /var/www/vhosts/server_n...

changing permission for files and folder recursively using shell command in mac

In Linux we can use the following command to change permission mode of the files and folders recursively. find "/Users/Test/Desktop/PATH" -exec * chmod 777 {} \; how could i do the same for mac as i m getting the following error repeatatively. find: TEST_FILE: No such file or directory ...

Why a concatenation of gstrings returned from a function is an empty string - Groovy 1.7.4

I have the following code: public class TestGr { static String aaa = "wwww"; public static void main(args) { println "["+getAAA()+"]"; println "[" + getBBB() +"]"; } static String getAAA() { return "" + "${aaa}" } static String getBBB() { return "" + "${aaa}" } } The output of this code is:...

NSMetadataQuery end of search

Is there a way to know whether or not the NSMetadataQuery is still gathering metadata (or is still running)? I mean,in my program I set the search scope to a single directory; now, the query is simple so it takes a few time to collect all the data. How can I know if he finished or not? ...

help - testng doesnt work on the mac with eclipse: Bad version number in .class file

To get latest Helios eclipse + subclipse + m2eclipse and mvn to work on the mac, I had to make the "default" jdk 1.6 thusly: cd /System/Library/Frameworks/JavaVM.framework/Versions ln -s 1.6 CurrentJDK AND I had to enable 1.6 using the applications/utilities/java preferences app. Now eclipse, and mvn work, with 1.6 set as the target ...

Mac OS X Mono ASP.NET and C# compilation process

Hey everyone, I am trying to (temporarily!) do some ASP.NET and C# compiling on my iMac. Haha, it's so funny trying to do this on an iMac, it feels so.. wrong! Anyway, I've found that Mono is the best way to do this, in my opinion. I have a simple ASP.NET page with the following code: 1 <%@ Page Language="C#" %> 2 <html> 3 ...

Navigation application in mac

hi, i am new to mac development, i have to create an application which will have multiple views/windows like in installation wizard( where few option are selected one after other etc). Can any one provide me a link for any such tutorial or where can i refer them. sample app will be very much appreciated. ...

Cocoa - prevent window from getting overlapped

I'm writing an app that should remain visible on the desktop at all times. As such, I have to prevent other apps' windows moving on top of my app's window. The Dock.app from Mac OS X partially does this: if you resize windows, they won't resize into the Dock.app's screen space, and if you hit the windows' '+' button, the window will not...