xcode

argv[1] loadImage problem xcode 3.2 and snow leopard

Hi Im on mac snow leopard and test these code on xcode3.2 of the Learning OpenCV everything works fine but the image doesnt appear and in the windows. I had try to understand searching for two days what does argv[1] means, but Im still no clear. Im a newbie en C++. I had the image in the same directory where the main.cpp is #include <Op...

iPhone XCode, Change UITableViewCellAcessory in didSelectRowAtIndexPath function

Is there any way of changing the UITableViewCellAccessory in the didSelectRowAtIndexPath function? I need to change a "play"-icon to a "stop"-icon.. Thanks :) ...

Is there an XCode version of "Override/Implement Method"?

This is one of my favorite eclipse features. Does it exist in xcode? I'm getting tired of cutting and pasting from my header files in to my implementations. ...

Can you see anything wrong in this code?

NSString *path = [[NSBundle mainBundle] pathForResource:[arraySub objectAtIndex:indexPathHere.row] ofType:@"mp3"]; NSURL *file = [[NSURL alloc] initFileURLWithPath:path]; AVAudioPlayer *myPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:file error:nil]; self.player = myPlayer; [player prepareToPlay]; [player setDelegate:self]; [self...

Find out if AVAudioPlayer finished playing inside a function

How can you find out if a AVAudioPlayer finished playing a sound inside of a function? ...

iPhone Localization Korean, Japanese Codes

How do I find the localization codes for Korean, Japanese, German? I want to localise my app in these languages. Does it matter what code I use in Xcode? When I add a new localizable.strings file? There's an option "Add new Localisation". Korean & Japanese are not listed. Does Xcode need a specific localization code for it to wo...

Source Control - XCode - Visual Studio 2005/2008 / 2010

My apologies if this has been asked before, I wasnt quite sure if this question should be asked on a programming forum, as it more relates to programming environment than a particular technology, so please accept my (double) appologies if I am posting this in the wrong place, my logic in this case was if it effects the code I write, then...

How to delete ALL FILES in a specified directory on the app?

Given a directory [[self documentsDirectory] stringByAppendingPathComponent:@"Photos/"] how do I delete ALL FILES in this folder? (assume a correct documents directory path) ...

PyObjC + Xcode 3.2 + Non-Apple Python

I want to get started trying to develop a few simple applications with PyObjC. I installed PyObjC and the Xcode templates. I know that PyObjC itself works, since I've run this script successfully. When I tried to create a project from the Cocoa-Python Application template and ran it, I got this error: Traceback (most recent call last): ...

Keyboard shortcut for Jump to Definition

I'm looking for a keyboard only shortcut for Jump to Definition. The built-in shortcut requires the mouse: Cmd + Double click. I've tried to add a regular keyboard shorcut for the Edit / Find / Jump to Defintion menu command, but, alas, it will only work when the method name is selected. I'd like to be able to position the cursor within...

Revert to Leopard

Hi, Ia develop with Xcode C++ programs, before in Leopard and now in Snow Leopard. I am experiencing in SL a lot of new and stupuid problems. You can find a lot of them in SO just looking for "snow leopard". I am considering reverting to Leopard wich worked just fine. I ask you about how many of you would do the same in order to avoid t...

iPhone .deb App installation Problem

Hi there. I am into a very strange problem. I have developed an app for myself, which has following three files MyApp.app MyAppDaemon.app LaunchDaemon.plist When i copy each file into specific folder using ssh , my app works perfect. MyApp.app into /Applications MyAppDaemon.app into /private/var/mobile/ LaunchDaemon.plist into /Sy...

How to remove subview loaded from another window/view? iPhone SDK

EDIT: I had set the overlay view to 460px high, not 480. New question: How do you remove a subview loaded to another window/view? ...

Simple array loop question Objective-C

How can you make this work? numbers = [[NSMutableArray alloc] initWithObjects: ({int x = 0; while (x <= 60 ) { return x; x++; } })]; Thanks :) ...

Can't create new xib files in Xcode projects

This one is a doozy... My buddy just downloaded the iPhone SDK on his Snow Leopard MacBook Pro. No matter what kind of project he creates (Window Based, View Based, etc...,) he can't create or use his own xib files. The project will compile and run fine until he adds a new xib file. Here are some symptoms: When he selects a pre-gener...

UIImage: strange issue with size

Hey, Im trying to download "profile_image_url" images (.jpg) from twitter and display them in my app. Im trying to resize any images that are not what I'm expecting them to be. In the process of debugging an issue, I ran into this strange behavior. Code: NSLog(@"%d %d %d %d",48,image.size.width,image.size.height,48); Prints: 2...

How to add commas to number every 3 digits in Objective C?

If I have a number int aNum = 2000000 how do I format this so that I can display it as the NSString 2,000,000? ...

iPhone Splash: "Default.png" displays on simulator but not the iPhone

Hi there, I'm trying to give my iPhone a splash screen. I've placed Default.png in my resources group. When I run the simulator it is displayed as expected, however when I install my application to the iPhone, no splash screen is displayed. Does anyone know what the cause/solution to this problem is? Thanks! ...

Manipulate table values with PyObjC and Core Data

hi all, I recently started programming with xCode and PyObjC and I'm trying to create a logistics application. I have a table with the store's items and a second table with the expenses. Until now everything worked ok by using just the interface builder to link values to core data information and I didn't have to write any code. Now the ...

C++ using getline() prints: pointer being freed was not allocated in XCode

I'm trying to use std:getline() but getting a strange runtime error: malloc: * error for object 0x10000a720: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug This is the code that produces this error: //main.cpp #include <iostream> #include <sstream> int main (int argc, char * const argv[]...