xcode

Autorelease Drowning

I came across a problem that seems to be called "drowning" in autorelease pools. My code creates and destroys objects correctly. However, I use some class methods that autorelease several variables without my knowing about it. Considering they loop thousands and thousands of times every minute... I find myself drowning in thousands of u...

Yet another iphone memory leak cry for help. Looking for advice on next steps.

Hi, I hate having memory leaks and usually pride myself on, blah, blah, blah. Help! The leaks I have aren't crazy big (a few K at max), but I want to remove them for sure. There are two categories of leaks and I've got some screen shots of each from Instrument's Leaks tool. The first is just some odd Java/Web thing that happens withi...

Xcode (Snow Leopard) project works differently based on declaration of a single variable.

OK, I'm still quite new to Xcode/Cocoa etc, so please forgive me if this issue is something totally obvious, but it seems to me to completely defy any logical software behaviour that I have ever seen. I have a project which uses OpenGL in Snow Leopard. I have created a very basic solid teapot (using glut, obviously) and have shone a lig...

Insert date/time in UITextView when user hits return

Im trying to Insert the current date/time whenever the users hits the return key or starts typing on a UITextView in Xcode but not quite sure where to start. I know this method is for when clicking into the TextView but doesn't seem to work: - (void)textViewDidBeginEditing:(UITextView *)textView { self.txtDetail.text = [self.txtDet...

error: pointer being freed was not allocated

I am trying to overload the assignment operator to do a deep copy of a polygon object, the program compiles but I am getting an error toward the end that I want to clear up. Below is the relevant code, if you think I need to add more please just post a comment. Assume the proper #include's and that the << operator is overloaded for prope...

What are some methods for keeping track of Xcode projects in source control?

In the early stages of a project when lots of files are being added and the project is being worked on by more than one person concurrently, Xcode project files tend to come into conflict often under source control. Merging those is a pain and often results in lost file references if you're not careful. Has anyone worked out a tried an...

How can I disable multiple buttons?

hi, I have 2 buttons on my view and i want to disable the first button when i click on an other button and disable the second when I click again on the button. I have tried with this code if (button1.enable = NO) { button2.enable = NO; } So I have in a NavigationBar a "+" button and 5 disable buttons in my view. When I push the...

Importing into .h versus .m

Is there a difference between importing something (e.g. #import "JSON.h") into the header file versus the implementation file? ...

How can I disable multiple buttons?

hi, So I have in a NavigationBar a "+" button and 5 disable buttons in my view. When I push the "+" button I want to enable the first button and when I push again that enable the second... I have tried with that code if (Button1.enabled == YES) { Button2.enabled = YES; } I really don't understand how I can do that... Thnaks f...

How do I edit iPad-specific XIB after upgrading project to Universal

I have an app project that I upgraded to a Universal App for the iPad. XCode created a Resources-iPad folder and duplicated my .xib file in there with the -iPad tacked onto the file name. That's all well and good. But when I edit that XIB it doesn't seem to understand this is an iPad XIB. For instance, the Window object is 320x480 an...

What version clang is in Xcode 3?

How do I figure which version of clang that Xcode use? It's 1.5 in Xcode, yet the official llvm-clang is 2.7. Are they the same? ...

Compiling iphone app for device - errors

I've been trying to compile an iPhone app to test on a device, it's properly provisioned and everything, but I'm getting the following error in xcode when I'm trying to build it: error: can't exec '<com.apple.tools.product-pkg-utility>' (No such file or directory) Command <com.apple.tools.product-pkg-utility> failed with exit code 71 ...

Error : Argument list too long:recursive header expansion failed at /Applications/Adobe Acrobat 8 Professional/Adobe Acrobat Professional.app/...

hi all Can Any one tell why this error occur and how to resolve it Check Dependencies Argument list too long: recursive header expansion failed at /Applications/Adobe Acrobat 8 Professional/Adobe Acrobat Professional.app/Contents/Plug-ins/Comments.acroplugin/Contents/MacOS. Thanks Cristina Martin ...

background application

in my application i have a voice who play every 30 min i put my code in - (void)applicationDidEnterBackground:(UIApplication *)application it's working great on simulator and on device but when someone call me or i call someone the application will terminate and don't play the sound again :( can anybody help me to solve the problem ?...

How to use Linked Libraries when the build folders are different.

I have an XCode project consisting of three targets. A Cocoa application, and two shared libraries (as .dylibs). The one .dylib file implements some core framework functionality and goes into the same directory as the .app The other .dylib is a plugin, and goes into a Plugins folder. So I have setup the Per-configuration build Products ...

Best Ways to Store iPad/iPhone Application Data

I'm developing an iPad application and I'm not sure what's the best way to store application data. So far I've been using a .plist that stores hundreds of strings for a puzzle game and that works great, but if my app is to be any good, it's going to have to store tens of thousands of strings (representing pre-made puzzles). I've read t...

problem with UIAlertView

hi, i am trying to call and alert when a button is pressed. i use this : -(IBAction)Add { UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"add button pressed" message:@"Add to record" delegate:nil ...

programmatically retrieve project directory in xcode objective-C project

How do I retrieve the project directory of an xcode project targeted for the ipad? Or if it isn't possible, then how do it retrieve the home directory of the user? something like: NSString *path = [NSProject getPath];//could be absolute or relative or NSString *homeDir = [NSURL getUserDirectory]; ...

Create a second Window

Hi I want to run an OpenGlView in a second window. I can open this window "simualtion", but there is nothing to see, which I created in the Interface Builder. I think the problem is that I created a completely new window. I try this way, because I want to close the old window and open the new one with one and same method, because I want ...

T4 tool for XCode

Hello folk, Does anything like the T4 text template generation tool of visual studio exist for XCode? Thanks for help, Enyra ...