mac

How to figure out if the network the mac is connected to is a WiFi or cable network or the like...

Hi all, First off, you guys are all really helpful - thank you a lot! Is there a way to figure out what type of network a Mac is connected to? WiFi? Cable? USB Modem? Any Cocoa / Foundation framework I can use to figure that out? Thank you, Matthias ...

Keystroke for cmd-? on OS X? (Java)

Hey there I'm desperately searching for the keystroke to access a help menu from my Java application. The command for that is cmd-?, but I've got no idea how to access that. The keystroke for cmd-c is defined by KeyEvent.VK_C, but unfortunately VK_? does not work. ;) I've searched the web up and down and couldn't find the right code. H...

How to structure the code for a Cocoa Application

I'm writing a Cocoa application where I have an auto generated app delegate:(MyAppDelegate.h/MyAppDelegate.m) So I am not sure of the best way to structure the class files for this Cocoa application. I understand MVC thoroughly (on the iPhone) but I'm having a block as to try organising the source properly in a Cocoa app. I need to spa...

Become great mac developer from scratch, how?

First of all no programming experience. I am a windows power user but I'll make the switch to mac (matter of taste, nothing more) when macbook pro's are updated. So I know my way through windows and even mac pretty well. As I see it there are two ways for mac development (not iphone): Objective-c and MacRuby. After some digging here and...

Is there a graphics/game engine that supports PC & Mac?

Is there a graphics and/or game engine that runs on both Mac & PC? I've seen Unity and that's a possibility, I'm wondering if there are any other choices. Ideally I want to port the same C++ game code to both PC & Mac platforms, but let the underlying game/graphics engine take advantage of the appropriate hardware. edit: I'm looking on...

How to alter colors in mac/cocoa text views

Is there a way to alter the standard background and text colors in cocoa text views throughout the mac os? Since the same text system is used by textedit, mail and other programs, I imagine there is an underlying preference that could be altered. Any ideas how to access it? Just to be clear, I don't mean simply to alter the document col...

NSTextField or NSTextView?

Could someone explain to me what are the main differences between NSTextField and NSTextView? I know that NSTextView has more features and is usually used for longer texts, and NSTextField is usually used for one-line plain text fields, but if I understand correctly, NSTextField can be also used with attributed strings and with multiple ...

OBJ-C: Call an instance of core-plot graph from separate view controller

I'm using a view controller i.e. ViewController:UIViewController and have another class GraphViewController:UIViewController . How do I call an instance of GraphViewController and place it into my ViewController? I am currently trying to call the plot within my ViewController directly, but I want to make the graph modular so I don't hav...

How can I compile 64-bit Mac programs with Free Pascal?

I have an x86_64 library on my Mac compiled by GCC, and I want to link it with Pascal code compiled with Free Pascal 2.4. What options do I give to fpc to make it generate 64-bit code? Without any options, I only get 32-bit .o files. I'm using the fpc-2.4.0.intel-macosx.dmg download from SourceForge, but when I run fpc -i, the only targ...

Show NSSegmentedControl menu when segment clicked, despite having set action

My question is based on another question. Instead of repeating a bunch of stuff, I hope it's okay that I refer you to that other question instead: http://stackoverflow.com/questions/1203698/show-nssegmentedcontrol-menu-when-segment-clicked-despite-having-set-action/ My question is: How would the code within [self showGearMenu] look lik...

Create a table using Objective C for Mac and display values in the table.

Can anyone guide me as to how to create a table using Objective C for Mac OS X. The program should read values from an NSArray object and display the values in the table. I would appreciate it if anyone helped me out. ...

How do I attach the console to Xcode IDE

Hello, I'd like to know if there is a way to show the Application Console on Xcode IDE. Everytime I run the program, I have to click on the Show Console button. I'm running Mac OS X Snow Leopard and XCode 3.2 Thanks!! ...

Starting an application in OS X with low priority

Hello. I would like to setup my Eve Online application to start with lowest priority every time I open it. Is it possible, and how? I am using Mac OS X 10.6.2... Thanks for any help! ...

Making a 64 bit shared library that dynamically links to a 32 bit library on Mac OS X Snow Leopard

Update: After some more reading I see that this problem is totally general, you can't mix architectures in the same process, so 64 bit Java cannot dlopen() a 32 bit library like FMOD. Is there any possible workaround for this, keeping in mind I'm writing my own C interface to the FMOD library? I need to make a 64-bit dylib on Max OS X b...

Detecting when a space changes in Spaces in Mac OS X

Let's say I want to write a simple Cocoa app to make the Spaces feature of Leopard more useful. I would like to configure each space to have, say, different *screen resolutions *keyboard layouts *volume (for audio) So there are two parts to my question: 1) I suppose there are ways to modify these three things independently of Spaces, r...

Error installing MySQL-python on MAC Snow Leopard, OS 10.6

Hello members, I am trying to install the MySQL-python on MAC OS 10.6 (Snow leopard, 64 bit). I followed the steps: 1. Installed MySQL for Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive. 2. Downloaded MySQL-python-1.2.3c1.tar.gz and unzipped it 3. CD to MySQL-python-1.2.3c1 and built it as: ARCHFLAGS="-arch x86_64" python setup.py bui...

How to link to a specific framework version in Xcode?

I've got an application that links against OS X's Python.framework. Since Snow Leopard has upgraded to Python 2.6, the framework now contains versions for 2.4, 2.5, and 2.6. My program doesn't seem to want to link against 2.6, though, and this ends up causing errors when I try and use features from the newer Python runtime. I know I ca...

Java: How to detect (and change?) encoding of System.console ?

I have a program which runs on a console and its Umlauts and other special characters are being output as ?'s on Macs. Here's a simple test program: public static void main( String[] args ) { System.out.println("höhößüä"); System.console().printf( "höhößüä" ); } On a default Mac console (with default UTF-8 encoding), this prin...

Development for different mobile platforms on Mac

I'm developing for iPhone mainly but wonder for what other mobile platform I can develop on my Mac? Info about any mobile platforms (Symbian, Maemo, Win-mobile, Android, Bada etc) is appreciated. ...

How can I create a temp file with a specific extension in bash?

I'm writing a shell script, and I need to create a temporary file with a certain extension. I've tried tempname=`basename $0` TMPPS=`mktemp /tmp/${tempname}.XXXXXX.ps` || exit 1 and tempname=`basename $0` TMPPS=`mktemp -t ${tempname}` || exit 1 neither work, as the first creates a file name with a literal "XXXXXX" and the second d...