mac

What are the various files that could have PATH declarations for OS X Terminal in them?

So I'm having a path issue on OS X Leopard. It seems OS X is adding other paths that I'm not stating and it's messing with my path priority. I only have a .bash_login file, I don't have a .bashrc or a .profile file. My .bash_login file is as such: export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" When I run expor...

OS X inter thread communication question

I am developing a multi-threaded application in Cocoa. The main thread takes values from the user, and when a button is clicked I invoke a secondary thread in which a long calculation takes place. Now from this thread I have to return the output of every step of the calculation to the main thread. I want to periodically send data from on...

Mac OS X accessing devices with same Vendor ID and different Product IDs

I am writing an application which opens USB devices and transfer some data. I am following the UsbSimpleNotificationExample from the Developer Examples. The example adds notifications and assigns callbacks for a unique Vendor ID and Product ID. But for my application I have multiple PIDs and a single VIDs. How can I add a dictionary entr...

As a developer, what changes or installs, do you make on a vanilla OS X system?

As an example these are some of the things I always do when starting a new machine: Install 'Visor' - gives you an always available HUD style terminal window via F1. Install 'Clix' - run a million system customization command line instructions. Install 'Default App' - self explanatory. Set 'Terminal.app' to open and be hidden automa...

Automator action to create Keynote presentation from text file

Newbie here. Thanks for looking. I need to import a text file (consisting of subtitles) into a Keynote presentation. I need to turn each subtitle into a single slide, interspersed with blank (black) slides. I'd like to create an Automator action in order to do this. I think the way to do this is to filter paragraphs ending in two line ...

Changing Mac OS X User Password Programmatically or via Script

I need to be able to change a user's password from a cron task or from an ssh session. Is there an easy way to do that with a bash script? If not, what's the easiest way to do it in Cocoa? ...

MYSQL Installation Troubles

After upgrading a few gems via terminal on my mac, I have created a new rails project backed up by a mysql database. Upon starting the app, the regular welcome aboard page appears. Here's the problem - I tried clicking the link entitled "About your application's environment", I receive the following output in my browser: MissingSource...

Multiple windows or "pages" in an application

I am a newbie in Mac application development. I want to write a GUI application in Cocoa using Interface Builder. I want multiple screens i.e. when one button on a screen is clicked, another screen should be displayed. How can I activate a new screen at button click event? ...

A good place to find frameworks with Interface Builder plug-ins…

Someone on here recently recommended BWToolkit, and it really impressed me, so I started googling for more IB plug-ins. I've found a couple on random blogs, but haven't been able to find any kind of repository/aggregator for them. Anyone know where I can find more of these? Thanks. ...

How can I pass user credentials through a Unix-domain socket on Mac OS X?

Under many operating systems Unix-domain sockets allow a process to reliably pass its credentials to another process in a way that can't be maliciously subverted. For instance, this is done on Linux through the SO_PASSCRED and SO_PEERCRED options, on FreeBSD by passing messages that include the cmsgcred structure, and on NetBSD by setti...

How to I change the main menu in Cocoa?

I have a cocoa app with two types windows each of which requires a different main menu to be displayed. In my MainMenu.xib I have the default MainMenu. In Window1.xib I have Window1 and in Window2.xib I have Window2 and it's MainMenu. When I have the first Window open I have the default Menu, when I open Window2 I get it's menu. Howev...

WebView renders in the wrong location in my ScreenSaverView

I've written a screen saver that displays a web page. It works exactly as I want it to on my main display, but in the preview and secondary displays, the web view is hanging off the top of the screen. Example (from preview): Uploaded with plasq's Skitch! My code is pretty straightforward. From within initWithFrame:isPreview: I have ...

How can I have multiple instances of webkit without sharing cookies?

I have an app that creates a couple of WebView instances and I'd like to have them operate as independently as possible. At the very least, I don't want them sharing cookies. A quick google search gave me results liking "you can't." I'm hoping someone has a better answer. ...

How do I use my standard python path when running python scripts from xcode macros

I'm trying to run Python scripts using Xcode's User Scripts menu. The issue I'm having is that my usual os.sys.path (taken from ~/.profile) does not seem to be imported when running scripts from XCode the way it is when running them at the Terminal (or with IPython). All I get is the default path, which means I can't do things like #!/...

How easy to get started on making apps for Mac?

I've done some delving into AppleScript but I'm interested in how difficult and long it would take to make semi-useful Mac apps. What really good resources besides Apple Documentation? ...

Creating a .DMG

Hi I want to create a dmg file for my Mac project. Can someone please tell me how to do this? This being my first Mac project, I do not have any idea how to proceed. I also want to give the user an option of running the app on start-up. How do I do this? Thanks. P.S. I also want to add a custom license agreement. ...

How do I find the correct case of a filename?

This is on the Mac: If I have two filenames /foo/foo and /foo/FOO they may refer to the same file or the may be different files depending on the file system. How do I figure out if they are both pointing to the same file? And if they are, how do I get the correct representation of the filename? My problem is caused by links. A link mig...

Eclipse keyboard shortcuts broken in OSX 10.5.6

So I have been using Leopard for a year now, and the lastest update broke the keyboard mapping for eclipse. I use the dvorak layout, and now in eclipse if I press the ⌘ and the b key it does a build, instead of a cut(b = x). Does anyone else have this issue, and are there any workarounds? EDIT: The best current workaround is to upgra...

Widget "flip" behavior in Core Animation/Cocoa

I'm trying to make a Card class that duplicates the behavior of Dashboard widgets in that you can put controls or images or whatever on two sides of the card and flip between them. Layer backed views have a transform property, but altering that doesn't do what I would expect it to do (rotating the layer around the y axis folds it off ...

Finding the Current Active Window in Mac OS X using Python

Is there a way to find the application name of the current active window at a given time on Mac OS X using Python? ...