mac

Return code from Mac app

I'm trying to create a Mac app, which should return an error code in some cases. This is an Intel bundle. (It's a Carbon C++ project, but this is probably irrelevant.) The standard way to do it in C++ would be to have the main function return the value, and that's what I do, so I think that part is correct. (I also tried explicitly calli...

File Permissions On The iPhone Simulator

Are the permissions for the iphone/ipad simulator different from the device itself? I only ask because I'm experimenting with file I/O, and creating and then writing to my own temporary file fails, but creating and writing to, say, the Desktop on my Mac (from the iPad simulator) is completely okay. Am I doing something wrong with my tem...

How to resume a Selenium RC test after a computer sleep?

When I put my Mac to sleep while an interactive Python session with a selenium instance and corresponding browser is running, after waking up the browser (or selenium server?) are no longer responding to any commands from the Python shell. This forces me to restart the browser, losing the state of my test. Is there a way to overcome th...

Is there a way to pass arguments to a pkg

Hello All, I am wondering if it is possible to pass arguments to a pkg's Install scripts(preinstall/upgrade,postinstall/upgrade). I noticed that when running my installer(my.pkg), my shell script do have access to some arguments($0-$3). $0 = Script path $1 = Package path $2 = Default location $3 = Target volume Would it be poss...

Mac Setup to Test Applications in Every Possible Browser?

What is the simplest/most-streamlined setup for testing apps in all of todays browsers? Safari 2, 3, 4 (and versions in between) Firefox 1, 2, 3 (and sub versions) IE 6, 7, 8, 9 Opera 8, 9, 10 Chrome Is there some sort of program like the Ruby Version Manager (RVM) that allows you to install browsers at different versions and then ju...

Mac Programming: Command-TAB - How does this build the application list?

I have a need to enumerate the applications that have "windows", "icons", whether if they are minimized to the dock or not. I need basically the list of applications that Command-TAB brings you. How do you do this programmatically? Everything I tried gave me everything, or just the applications that are NOT minimized. Drives me nuts. T...

Silverlight displays time zone info on mac and not PC using String("G") as format

I've got a Silverlight application that shows some data. I use a DateTimeConverter to convert the DateTime value into a String. I use the dateTime.ToString("G") format and I get back 01/01/2010 12:01 or something like that. So far so good. However, the same application on a Mac shows 01/01/2010 12:01 +02:00. That's the time CET with the...

OpenGL texturing problem

Hi, I've been working on cross-platform 3D engine but atm I have version running natively on OSX and iPhone/iPad ( which in Simulator uses system GL library ). The problem I'm experiencing is that each texture is slightly shifted in both directions ( looks like just about one texel shift ) and I would look more in my code if I didn't se...

how to know if current architecture is i386 or x86_64 in macs? (Xcode)

Hi, I am handling a camera that needs different parameters in different architecture, Is there a flag that I can check to see if I am in 32bits or 64bits in my mac? I was trying this but does not seem to work, I always get 32Bits!! : #if defined(PER_ARCH_CFLAGS_x86_64) NSLog(@"64bit!!"); #else NSLog(@"32Bits!!"); #endif ...

NSMenuItem Hidden binding issue

I have an NSMenuItem which I have bound to an NSUserDefaults boolean value in IB like so: When bMenuHidden is true, I would like my NSMenuItem to be hidden, and vice versa. This works as expected under Snow Leopard. However, Leopard struggles in some cases. In particular: my NSMenuItem is visible upon first launching the application, ...

How to declare a specific snippet in textmate {MAC}

Hello, i don't know if this is the right place, but i would know how to declare a new macro/snippet in textmate to do this : I select the text Sample Text I use whatever combinaison of key and it transforms it into : <?php echo __('Sample Text') ?> Thank you ;) ...

Is there a way to add Google Chrome as an external web browser in Flash Builder Standalone for Mac?

It currently seems impossible to add Google Chrome as an external web browser in Flash Builder Standalone for Mac. In this context, Eclipse only cares about "Unix executables" and not .app files. For example, the path to Firefox on a Mac is: /Applications/Firefox.app/Contents/MacOS/firefox-bin which is only found by right-clicking and...

How can I better understand and navigate the structure of large XML files

Hello everyone, I'm slogging through a somewhat large XML file. Say I'm looking for a particular value within the tree. I find it manually, but then to find it programmatically I need to know the path. Right now, I'm usingtidy and vim to pretty-print the file so that can I inspect it manually. It's getting old real fast though, 'cause t...

64-bit Preference Pane Displays Window

I've developed a preference pane which initially was being built with the Architectures build setting set to "32-bit Universal" (was the default). This caused System Preferences to relaunch in 32-bit mode but the preference pane worked fine. I switched Architectures to "Standard (32/64-bit Universal)" and set garbage collection to "Sup...

How to convert python3-pyqt code into .app file for mac os x?

for python2.x py2app will do the work. But for python3 code which one is alternate to go ahead? Or any other way to get single .app file? ...

How to have multiple apps - one Core Data?

I’m an experienced developer, but new to Mac. I just don’t want to go down one path only to find out that I made some fundamental error or incorrect assumption later on. I want to ultimately build and sell an iPhone app using Core Data. The app will be free with content available through in-app purchase. Here is what I want to be able ...

Recommended setup to develop games (2D/3D) on a Mac?

What tools, SDKs, applications etc are recommended to develop 2D/3D games on a Mac (and which will target Mac)? ...

Internal and External IP Address in 10.4

IMPORTANT EDIT It seems I've caused a lot of confusion in this post by differentiating between 'internal' and 'external' IP addresses. Allow me to try to clarify: Internal = PRIVATE IP ADDRESS External = PUBLIC IP ADDRESS The concept of internal and external were completely of my own invention. Apologies. Hey Everyone, With your he...

How to write to the System.keychain?

I'm writing a preferences panel and I need to either update or store a password in the System.keychain for others to find. Here's the code I have so far: Boolean addOrUpdateKey(NSString *service, NSString *key) { OSStatus retVal; SecKeychainRef systemKeychainRef; SecKeychainItemRef kcItem; UInt32 pwSize = 0; char *password = N...

Compiling kernel to a binary file on mac

I was following these tutorials to make a simple kernel that I would then load using GRUB. The instructions for compiling didn't work (ld couldn't find the -T option) and when I finally got a compiled file it was in Macho format. What are the correct steps to take when compiling these files on Mac. Edit: I compiled the code on an Ubuntu ...