osx

What is the right path for PHP includes on a Mac?

Running Mac OS X 10.5.8, with PHP 5.2.11 Pre-installed. Using Coda 1.6.10. I'm writing PHP files, and then preview them running from file, not server. This was working fine till I tried PHP includes. These don't work as a relative path, only as an absolute from the root of the drive. Is there any way I can use statements like incl...

Help with replacing Mac factory install of apache with MAMP PRO so FileMaker will work with my other websites?

I am running Mac 10.4 and have been using MAMP PRO to host several websites I manage. Now that I have installed FileMaker Pro Server, it forces me to turn Web Sharing on in System Preference. So is it possible to either replace Apache with MAMP PRO's version? Or is it possible to get FileMaker Pro to use MAMP instead of Web Sharing? I...

LibPNG + Boost::GIL: png_infopp_NULL not found

Hi, I always get this error when trying to compile my file with Boost::GIL PNG IO support: (I'm running Mac OS X Leopard and Boost 1.42, LibPNG 1.4) /usr/local/include/boost/gil/extension/io/png_io_private.hpp: In member function 'void boost::gil::detail::png_reader::init()': /usr/local/include/boost/gil/extension/io/png_io_private.hpp...

How to make OSX application that just runs opens some file type and runs arbitrary Ruby code?

It's trivial to make a program executable from shell - just put #!/usr/bin/ruby on top, chmod +x it and done. Unfortunately OSX won't let me associate file type with such scripts - it requires its .apps instead. This sort of distinction doesn't seem to exist on other operating systems. What's the simplest way of making such .app, which ...

Is there a way to designate that an app opens on a specific display in OsX?

I need my application to launch in a specific display (assuming there's more than one display) and go to full screen. The app itself is a Flash app, but I can write a native executable for the mac to launch it, I just don't know how to dictate which display it opens in. This is a fairly simple thing to do in Windows, I was hoping ther...

When to retain a "delegate"

I know that in Objective-C you should never retain your delegates because it may cause a retain-cycle, however, how do you know the difference between a delegate and a non-delegate object ? Can't it be said that just sending a message to any object is delegating work to that object ? ...

Getting CoreMIDI to work in snow leopard with SimpleSynth

I have been trying to follow the steps in the book Ruby Practical Project - making music with ruby and was trying to get CoreMIDI and output some notes using SimpleSynth. I can connect to the destination but when i do something like midi = LiveMIDI.new midi.note_on(0, 60, 100) I get no output from the sound system. Has anyone tri...

OS X: Terminal output of javac is garbled.

I've got my computer set up in Japanese (hey, it's good language practice), and everything is all fine and dandy... except javac. It displays localized error messages out to the console, but they're in Shift-JIS, not UTF8: $ javac this-file-doesnt-exist.java javac: ?t?@?C??????????܂???: this-file-doesnt-exist.java ?g????: javac <option...

MySQL bindings for Rails 2.3.5 on Mac OS X 10.5.8

I have a rails environment which I set-up with macports. I recently updated macports which seems to have had the side effect of breaking rails. When I try to boot a rails server I get: $ ./script/server => Booting WEBrick => Rails 2.3.5 application starting on http://0.0.0.0:3000 /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/...

Can XCode draw the call graph of a program?

Hi, I am new to Mac OSX, and I wonder if Xcode can generate , for a given C++ source code, the call graph of the program in a visual way. I also wonder if for each function, and after a run, whether it can also print the %time spent on the function If so, I would thank really some links with tutorials or info, after googling I did not...

How do I actually use Authorization Services?

I've been searching and experimenting for nearly four hours now, so I'm gonna just ask straight up: How can I correctly use the Authorization Services API to show the user a system-level authorization window, the same one you see when you click a lock icon in System Preferences? From what I can tell, there is no way to do it using Coco...

compiling OpenCV on Mac OS X Snow Leopard gets error: ‘Movie’ does not name a type

When I'm trying to compile OpenCV on Mac OS X Snow Leopard I recieve an error highgui/cvcap_qt.cpp:76: error: ‘Movie’ does not name a type There is a structure /// Movie state structure for QuickTime movies typedef struct CvCapture_QT_Movie ...

JList with transparent cell renderer on MacOS

I have the following Java Swing code that shows a JList with custom cell renderer (JCheckBox used as renderer component). The JList itself is made transparent, and also the JCheckBox is made transparent, so basically the color of the background container (yellow) should shine through. This works fine on Windows and on Linux, but on MacO...

mysql not in my PATH for some reason

I've installed mysql on several macs and on one of them mysql is not in the path. If I export it it shows up in the path correctly, but upon reboot, disappears. What should I do to get the machine to keep it in the path and what are the machines that DO have it in their path doing differently? Any thoughts appreciated. ...

Installing unpacked ruby gem.

Hey there, I am trying to install the cairo ruby gem on OSX 10.6. There seems to be a bug in the extconf.rb, which I've patched, but now I don't know how to create a gem, so I can install it... gem build folder won't work because there is no gemspec file or whatever (I've got absolutely no experience with gems^^), and gem install wants ...

Cocoa multi window drag and drop example

I am looking for a cocoa example that illustrates how to drag an image from one window to another. If not I would like to see an example that shows dragging an image from a source and destination in the same window. If anyone has a link to any such examples I would greatly appreciate it. ...

Unable to set variables in bash script in Mac OSX

Hello! I am attempting to automate moving files from a folder to a new folder automatically every night using a bash script run from applescript on a schedule. I am attempting to write a bash script on Mac OSX, and it keeps failing. In short this is what I have (all my ECHOs are for error checking): #!/bin/bash folder = "ABC" useracct...

Is there any way to get a list of connected servers in OS X? (Bash, Obj C, AppleScript...)

Simply, I'm just looking to get a list of connected remote disks. I have a script right now that compares /Volumes/ to "diskutil -list" but that only gives me the name of the remote disks, not the actual address. Anyone have ideas as to how I might go about doing this? Thanks in advance. ...

How to build this project?

Hi, I've been a visual studio developer for long and just trying to understand how things are in linux/unix worl. I found an open source project (Gcomandos) in source forge and tried to build it. when I download the source, I get these files: 16/02/2007 05:16 PM 25,987 aclocal.m4 16/02/2007 05:17 PM 127,445 config...

creating custom event / signal on cocoa os x

I am not much familiar with developing application using cocoa on mac. Can some one help me with how can i create custom events or signals, and how to make sure thread acts when these are generated or triggered. Any help will be appreciated. ...