xcode

Why is Xcode 3 displaying multiple compiler errors or warnings for each that actually occurs.

When I build in Xcode, any errors or warnings are being duplicated. So in the IDE, I get twice the number near the icons in the status bar, and where the yellow or red bubbles show up in the editor, there are two warning lines (or error lines) below the line where the warning (or error) occurred. Anyone else have this problem, or know ...

Can git be integrated with Xcode?

Is there any way to use a git repository with the built in SCM functions of Xcode? ...

Force static linking of library linked to Xcode target?

My Xcode target links against hdf5 library (using the Link Binary with Libraries build phase). libhdf5 is installed using MacPorts, thus /opt/local/lib contains both the dynamic (.dylib) and static (.a) versions of the library. The text output from the build shows that there is, as expected, a -lhdf5 in the linking step of the build. gc...

Delegate as external class in Objective-C

I'm creating a simple project for iPhone, using XCode and Interface Builder. While I understand what a delegate is, I have a problem with using it. I have an UITextField in my interface. It displays keyboard when user taps on it, but I need to program manually how to hide keyboard. It can be done using delegates. So in IB, I'm taking Ob...

iPhone SDK: Welcome video

Right, I have a video ready for it to be played on start up of my iphone App. How can I get this implemented into my Xcode project? I would like it to load as soon as the app is loaded, and the after it is played, to follow onto the correct view controller where the main bulk of my programming is. ...

Sample Cocoa app, ref counting, [pool drain] yields EXC_BAD_ACCESS?

I'm working through Cocoa Programming for Mac OS X (3rd ed) and in chapter 4 I wrote this app: int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; //create the date object NSCalendarDate *now = [[NSCalendarDate alloc] init]; //seed random # generator srandom(time(...

Building Objective-C App with External Framework

I am integrating growl into my Objective-C app. However If I build and run my app without copying the Growl.framework to ~/Library/Frameworks or a corresponding location then my App fails to execute. I don't really fully understand Frameworks under objective-c, but I was wondering if there is anyway to include the Framework within my...

Change Xcode to use custom-installed version of Subversion

Does anyone know how to change the location of the svn tool used in the Xcode IDE? I've installed a newer version in /opt/subversion/bin and updated my $PATH so that it works from the command line but can't get Xcode to recognize this. ...

XCode: Delete line hot-key

I'm looking for a way to map some hot-keys to "delete the line that my cursor is on" in Xcode. I found "delete to end of line" and "delete to beginning of line" in the text key bindings, but I am missing how to completely delete the line no matter what I have selected. TextMate has this functionality mapped to Ctrl+Shift+D and I'd like t...

How would I make a draggable Menubar icon for Mac OS X

Hey everyone. I am in the process of writing a menubar icon for an app i'm developing. However the NSStatusBar class does not have a method which would make the icon draggable, via cmd+left mouse drag. How do you make your menubar icon draggable with Objective-C code? Thank you :) ...

TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION error Iphone SDK development

Hello- I have a working program that was written by another programer that I am trying to add some features to in an effort to learn the Iphone SDK. I have carried out what I would assume was a fairly simple task of adding an additional UIButton to an existing view with like buttons. I have used the other UIButtons as a model and it se...

How to add/trigger-exposure-of twiddle-down for Code Signing Identity field in Xcode?

In Xcode, in only one project (that is, all other projects work the way I expect), in the Target Info window, build tab, the Code Signing Identity field-title does not have the twiddle to expose the "Any iPhone OS Device" field. How do I add it or trigger its exposure? ...

How do I declare a debug only statement

In c# I can use the following code to have code which only executes during debug build, how can I do the same in xcode? if #DEBUG { // etc etc } ...

How to enable the Research Assistant in XCode?

Hi, I created an empty project in XCode and have added all of my source code files to it. I do not have any build options/configurations set since the project was empty and I use my old Makefile from the command-line to build the app. Everything works - but... My problem is that it is a tad annoying not to have the information at my fin...

How to show the Logged Messages window in Xcode

Hello, I'm a very new Cocoa user and running into all sorts of problems... I'm trying to get the content of an Array and found this code to do this. NSLog(@"array : %@",collection); The problem is, I'm not getting any console or tracer window that shows this 'echo' Is there another command I should use, i've tried opening all wi...

How to declare a function in Cocoa after the function using it?

I'm slowly building my application to a working state. I'm using two functions called setCollection and addToCollection. These functions both accept NSArray as input. I also have a function called add in which I use both of these functions. When I try to compile, Xcode shows an error: 'setCollection' undeclared (first use in this f...

Viewing a dynamically-allocated array with the Xcode debugger?

Let's say I have an array in C++: double* velocity = new double[100]; Using the GDB command line, I can view this array with the command: > print *velocity @ 100 and it will print a nicely-formatted list of all the double values inside the array. However, when using the Xcode debugger, the most it will do is treat this as a pointe...

How can I divide a bound array in parts that automatically fill the table?

I used this 'tutorial' to bind my array called 'collection' to a NSTableview on my interface: http://www.cocoadev.com/index.pl?NSArrayController The interfacebuilder stuff isn't that hard. It becomes difficult when I try to actually show the data in my array into the view. in my .h file: @interface MyDocument : NSDocument { NSMuta...

How do I create a Cocoa touch template using the iPhone SDK?

I downloaded the free iphone sdk. Now when I try to create a new project I am not given the option to create a cocoa touch template. I only have the option to create a Mac OS X template. Does anyone know why this would occur and how to fix it? Edit: if you start then restart a download does that damage the downloaded material? ...

xcode / gcc linking problem: file is not of required architecture

Hi, I am trying to port a windows project that includes boost 1.37 and wxwidgets to the mac. It compiles ok, but the linker gives me a "file is not of required architecture for architecture ppc" error for libz.1.dylib and the same message as a warning a few other libraries. I also get a "duplicate dylib" warning for libz.1.dylib. The ...