osx

Restore app from dock

Hello I'm new to programming desktop applications for Mac (though a have a small experience with programming for IPhone). Suppose I create a new Cocoa project in XCode. This application does nothing just shows its window. I click on the cross in the red circle and my app minimizes to the dock and it has a blue dot on its icon showing t...

Writing daemon in objective c

I need to write a daemon, much like windows service on os x using objective c. Can anyone point to some sample? or guide me about how to do this? ...

Writing daemon in objective c

I need to write a daemon, much like windows service on os x using objective c. Can anyone point to some sample? or guide me about how to do this? ...

Check if Screensaver is Active using Mac Bash Script Command

I've found many useful Bash commands that can execute OS X behaviors from the command line such as: screencapture -x -C $FILENAME Is there such a command that can check if the screen saver is active? ...

Finding the install path of a utility with PHP on linux/freebsd/macosx

I have a PHP code block I've written that uses imagemagick's convert program (called through exec()) to create thumbnails of uploaded images (originally we tried using the PHP module calls, but kept running into memory errors). Of course to do this I have to have the full path to convert, which varies from system to system (on my mac it...

Python Performance on Windows

Is Python generally slower on Windows vs. a *nix machine? Python seems to blaze on my Mac OS X machine whereas it seems to run slower on my Window's Vista machine. The machines are similar in processing power and the vista machine has 1GBs more memory. I particularly notice this in Mercurial but I figure this may simply be how Mercuri...

Use ant to delete all files in a svn working copy folder under mac os x

I am trying to write an ant script which builds our project and will save the new build in a dist folder which gets committed to svn. As the name of the file changes for each build I need to delete all the old files in the dist folder (without knowing the names). For this I was using the following code: <exec executable="svn" outputpro...

localhost working 127.0.0.1 broken in Safari

I'm running an http server on a non-standard port on a Mac Powerbook G4 running OSX 10.5.8 and attempting to open a page in Safari 4.0.4. When I use the IP address 127.0.0.1 in the url Safari shows an error: Safari can’t open the page “http://12.34.56.78/” because the server where this page is located isn’t responding where the IP ...

Emacs 23.1 and Mac OS X problem with files drag and drop

I've just compiled and installed emacs 23.1 on my mac. It's running Leopard 10.5.8. And I've noticed that dragging and dropping does not work correctly (as it used to work with emacs 22). Now when dragging a file to the emacs icon on the dock, Emacs will start with two windows (frames in its terminology), one showing the startup screen a...

Cocoa Emacs print-buffer

In Carbon Emacs, I was able to call M-x print-buffer and an OS-X Print Dialog appeared, letting me choose my printer. Now that I've switched to Cocoa Emacs 23.1, the print-buffer command does not behave the same way. It ends up sending the job directly to the printer, using the last selected printer (which might not even be available). ...

Options for Syncing iPhone App with Desktop Application

What are the options for syncing an iPhone App's data with that of a Desktop application on either Mac OS X or Windows. So far I have come up with: iTunes plugin (Windows and Mac OS X) iSync (Mac OS X only) The "Cloud" ...

Detecting attached USB devices under Mac OSX

Hello, First of all a statement: I'm a newbie when it comes to programming for the Mac. However I have an assignment which requires USB communication with a device so I thought I'll start with something basic. I took the code from here, built it and ran it from the Terminal. It starts up and writes: Looking for devices matching vendor...

Shell command to send file via bluetooth on Mac OS x

Hi, is there any way to use a shell script under mac os x to send a file via bluetooth ? thanks in advance Nikko PS: anyone having a solution under windows is welcome too ... ...

ostringstream problem with int in c++

Hi, I would expect the following code to output hello5. Instead, it only outputs hello. It seems to be a problem with trying to output an int to the ostringstream. When I output the same directly to cout I receive the expected input. Using XCode 3.2 on Snow Leopard. Thanks! #include <iostream> #include <string> #include <sstream> usi...

Compiling SDL on OS X with makefile

I'm trying to compile the tetris program I wrote with C++ and SDL on OS X. First I tried doing this: `g++ -o tetris main.cpp `sdl-config --cflags --libs` -framework Cocoa` and got this: Undefined symbols: "Game::startGame()", referenced from: _main in ccQMhbGx.o "Game::Game()", referenced from: _main in ccQMhbGx.o ld:...

How do I get an Mac OS Component Manager Component to be visible to other processes?

This is a bit esoteric, but there have to be a few people here who know how OS X's Carbon Component Manager works. I've made a couple of little apps to play around with making Components (see here for some background). Actually, one of the apps is a sample program straight from Apple called 'Fiendishthngs'. It lists all the Components th...

Beginning mac software development

i recently downloaded the iphone sdk which came with xcode. what i wanna know from ur experience is that aside from iphone development is app development for mac making any money from anyone? ive been a web developer for a long time and wanna get into software development primarily on apple devices. what type on applications are in deman...

Command key as Meta key in OS X Terminal.app

When i unckeck the 'Use option as meta key' box in Settings, and then do Cmd-F (which i want to mean Meta-F for forward-word in bash) Terminal gives me a 'find word' popup, which isn't what i want. What i really want is for my Terminals to behave just like an xterm w.r.t. the key bindings. Is there any way to disable this popup and its b...

Web Service solutions from Mac

Trying to find a way to rapidly develop web services on the Mac Server platform that will be served via Apache and need to be able to write to flat files or SQL Lite on the Mac. We have .net, ObjC, C++, Python, and Java skills. We have done lots of web service work before on Windows and will probably go with Azure when we build out the ...

ruby 1.9 -- Gem is there but it says its not?

I just installed 1.9 on my 10.6 OSX, and it runs as the "ruby1.9" command. So I'm trying to do: sudo rake1.9 install But it keeps telling me Jeweler (or a dependency) not available. Install it with: gem install jeweler rake aborted! no such file to load -- git However, if I type: gem1.9 list The jeweler gem is clear as day righ...