Update: The link below does not have a complete answer. Having to set the path or variable in two places (one for GUI and one for shell) is lame.
Not Duplicate of: http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x
Coming from a Windows background where it's very easy to set and modify environment variables...
When I display an NSAlert like this, I get the response straight away:
int response;
NSAlert *alert = [NSAlert alertWithMessageText:... ...];
response = [alert runModal];
The problem is that this is application-modal and my application is document based. I display the alert in the current document's window by using sheets, like this:
...
I'm having the following problem:
Our users are using Macs running Mac OS Leopard to connect to an Xserve running Tiger Server (Version 10.4.11) via AFP.
On the Xserve, I created a user group called "staff" (using Directory Admin) and put some user accounts into that group. Then I made the group "staff" owner of the folder I want them...
Is it possible to install the latest JDK on Mac OS 10.5? What are the best options, considering that the Apple-supplied version is 1.5?
Update: I am trying to install JDeveloper 11, which requires JDK 6.
...
I'm trying to set the text of a textfield using the Carbon API like this:
ControlID editId = {'EDIT', 3};
ControlRef ctrl;
GetControlByID(GetWindowRef(), &editId, &ctrl);
CFStringRef title = CFSTR("Test");
OSErr er = SetControlData(ctrl, kControlEntireControl, kControlEditTextTextTag, CFStringGetLength(title), title);
CFRelease(title...
Developing a mac app, how can I tell whether the user is currently at their computer or not? Or how long ago they last pressed a key or moved the mouse?
...
According to this, for best results in Leopard my $DISPLAY variable should start with /tmp/launchd. Alas, my $DISPLAY variable is /tmp/launch-aLhnOW/:0
I do not set $DISPLAY in any of these ...
/private/etc/profile
/private/etc/bashrc
~/.bash_profile
~/.profile
... so I suspect there is some other configuration file that X11 is rea...
I am developing an Autoconf script for a project which should run on Linux and Mac, 32- and 64-bit. On Linux, detecting 64-bit is easy: you get x86_64 instead of i386 for build_cpu. I can't figure out how to do it for the Mac: both 32- and 64-bit machines give i386 for the build_cpu. Is there a way to detect the difference using Autoconf...
Is it possible to navigate an NSTableView's editable cell around the NSTableView using arrow keys and enter/tab? For example, I want to make it feel more like a spreadsheet.
The users of this application are expected to edit quite a lot of cells (but not all of them), and I think it would be easier to do so if they didn't have to double...
I'm trying to find documented (or, undocumented, if that's my only option) APIs on OS X to query a list of windows from the window server and then cause the windows to move and resize. Can anyone point me in the right direction? I guess I'd be starting with something like FindWindowEx and MoveWindow under Win32.
Note that I want to do...
I'm using Eclipse with Subversive SVN Team Provider 0.7.0.v20080425 as well as the latest update of Subversion installed on OSX 10.5.6.
My problem is that whenever I add a project folder to Eclipse enabling the Team integration it disables the SVN functionality from within the terminal throwing me the following error message :
svn: ...
How can I efficiently catch and handle segmentation faults from C in an OSX Carbon application?
Background: I am making an OSX Carbon application. I must call a library function from a third party. Because of threading issues, the function can occasionally crash, usually because it's updating itself from one thread, and it's got some in...
I downloaded a package installer for Python 2.6.1, but when I use the python command in terminal (bash) Apple's shipped 2.3.5 version loads up. How can I get 2.6.1 to load up instead?
...
Is there a command that would be useful?
...
I recently changed network and removed all my HTTP proxy settings from the System Preferences / Networking panel on OSX (Leopard). However, now whenever I use Eclipse the Java HTTP proxy system properties seem to be 'automagically' set to use my now defunct HTTP proxy.
I can find no direct reference to this proxy anywhere on my system, ...
I need to profile a program to see whether any changes need to be made regarding performance. I suspect there is a need, but measuring first is the way to go. This is not that program, but it illustrates the problem I'm having:
#include <stdio.h>
int main (int argc, char** argv)
{
FILE* fp = fopen ("trivial.c", "r");
if (fp)
{
...
What is the easiest way to get the network traffic sent and received bytes in objective c?
...
I'm having a flicker problem in a Java applet in Safari (Mac). However, it's not the usual double buffering problem.
I have isolated it down to one single drawImage call (no redundant repaint, no clear is called), which gives a white flicker before painting the image but not on every repaint. In fact, I measured the duration of the draw...
As the title says, does any Unix-like system ascribe a meaning to the SUID bit on a directory, and if so, what does it mean?
The SVTX (saved text, or sticky) bit has a meaning - thou shalt not delete a file from this directory unless you can write to the file. It is used on /tmp, for example.
The SGID (set GID) bit has a meaning - fil...
I'm ultimately trying to install PEAR so I can easily install PHPUnit. I want to set up a Mac, Apache, MySQL, PHP, PHPUnit development environment so I can test locally. I already have Apach, MySQL and PHP working. Now all I need is PHPUnit, which means I need PEAR to install it.
I have searched all over, and there are a few variations ...