mac

svn add iphone4 icon

I have iPhone4 icons, which are terminated with @2x.png My problem is that when I try to add them to svn with svn add path/[email protected] I get the error: svn: warning: 'path/myIcon' not found I suppose that svn or my system do not support the "@" in the path.. What can I do? I am running Mac OS X 10.6.4 and tried to add it direct...

Cannot find MacOS.so

Hi I'm trying to use a Python library which apparently must load code from MacOS.so, but it cannot be found on my system. I've tried linking to other ones found with the locate command, but with complaints about flat namespace. I'm wondering if it's required then why is it not packaged with other libraries? Where can I find the source f...

Git makes all checked out files' end of line CRLF

I am programming on mac, and I don't really understand what Git does with the end of line of my files : I created a repository with some files in Unix format (LF end of line). When I clone the repository that I created, all my end of lines are CRLF. Shouldn't it detect automatically that I need LF end of line ? I have autoclrf set to ...

UIColor comparison

Given a UIColor, I need to determine if it is "light" or "dark". If I could access the hex value of the color, I could just check if it was greater than or less than a certain threshold hex number, but there appears to be no way to do that. Is there? Or is there another way I could check the brightness value of a UIColor? ...

Why does popen() only work once?

Hi all, When I run the program below on my Mac (OS/X 10.6.4), I get the following output: $ ./a.out Read 66 lines of output from /bin/ps Read 0 lines of output from /bin/ps Read 0 lines of output from /bin/ps Read 0 lines of output from /bin/ps Read 0 lines of output from /bin/ps Why is it that popen() only reads data the first time...

Locate Git installation folder on Mac OS X

Hey, I'm just curious, Where Git get installed (via DMG) on Mac OS X file system? ...

Rails Gems Symbolic Links Setup on Mac OS X

I have Rails 3, and have been using a Gemfile to install several gems like annotate and rspec-rails Problem is in all the tutorials, it says to type things like "annotate" in the command line but it doesn't work "command not found" this make me believe that Symbolic Links are not in place to allow me to run/use the gems in terminal. Ho...

How to config Gedit on osx to edit UTF-8 files

I find the ~/.gconf/apps/gedit-2 directory where the %gconf file is. But How should i change it so that it use utf-8 as default. ...

find and replace / refactoring programmatically for files in mac

Hi, I want to make a program that will search and replace some words occurrence in a file. I am using xcode. I want to do this programmatically using some standard free API in a MAC application. ...

Activity monitior

how to do an application like activity monitor in cocoa ? ...

Mac OS X version of Texture2D.m, .h available?

Hi all, Apple's Texture2D class is a very useful bit of kit for iOS developers. Q. Is there a Mac OS X version of this class available? (I've googled but can only find iOS implementations, mostly through Cocos2D projects.) Cheers. ...

xCode command-line > foundation problem

Hi, I'm trying to set up a command-line > foundation "hello world" project. (as written in the book 'learning objective C for mac') ...When I select 'build & run' with the default settings for this project I get 4 errors, without modifying any code!? errors: stdarg.h: no such file or directory float.h: no such file or directory xmmin...

Does the Mac Developer Program have old versions of Mac OS X?

I'm developing something for Mac OS X. It's a port of a Windows product. One of my boss' concerns is how it will run on older versions of Mac OS X. I know Xcode has facilities for compiling for old versions of Mac OS X, but QA would prefer to actually run the older versions of Mac OS X on a Macintosh. Since we got into Macintosh devel...

Changing $PATH in OS X to run most recent version of Python

So I changed $PATH to have Python2.5 work with Django back when it didn't support 2.6. Now I can't install much of anything through Python because I screwed up a lot of the internals. $PATH is now unnecessarily long because I didn't know what I was doing when I was adding to it. .profile doesn't contain any of the paths that I added usin...

What is a CALayer?

What is a CALayer (as seen in the layer property on a UIView) and where would we use such a class? ...

Android NDK Confusion

Hey, I've been playing around with the NDK recently, finding that many of the tutorials available online really don't help. I've been using this tutorial and I've got it running great. However. Is this the correct use of the NDK? I mean if I have a game say with many classes all in C++ that I wish to port over to the android. Do I have...

Update Check in Objective-C? Coming from C#

I'm porting a program I wrote on C# to Cocoa and I'm trying to figure out how to use XML to go online to my website, grab the file and parse it, then compare the version and pop a message box to ask if you want to open your browser to the update page. Here's the code from C#: public void CheckVersion() { Version newVersion...

How to install Python 3.1.2 on Mac OS X 10.6.4 ?

Hi there I have downloaded the mac installer here, http://www.python.org/download/releases/3.1.2/ , & installed it. But when I run terminal & type python it says: Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. ...

How to bind an NSOutlineView selection with other NSOutlineView?

Hi. Like the title say, I need bind the item selected in one NSOutlineView with another NSOutlineView. I got a collection of objects that has another collection inside, I want to show the first collection in one NSOutlineView and his sub-collection in a separate NSOutlineView. How con I do this? ...

How to detect command key as a modifier in a glut program running on a mac?

I am developing a GLUT program on a mac. Mac's seem to pass modifiers through GLUT in a funny way. Alt and control keys are not captured by glutGetModifiers() instead they're translated into the button int. The command key doesn't seem to be captured by either glutGetModifiers() or the button int. Also, it doesn't show up as a key in my ...