Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning iPad Application Development
This is the forum to discuss the Wrox book Beginning iPad Application Development by Wei-Meng Lee; ISBN: 9780470641651
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning iPad Application Development section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 7th, 2010, 08:30 AM
Registered User
 
Join Date: Dec 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hello World

Hi I've started with this book. And I'm just at Hello World and the program is already giving me errors..

I've tried the code that came with the book... which is:
Code:
#import "HelloWorldViewController.h"

@implementation HelloWorldViewController

-(IBAction) btnClicked: (id) sender{
	//---display an alert view---

UIAlertView *alert = [UIAlertView alloc] 
initWithTitle:@"Hello World!"
message:@"iPad, here I come!"
delegate:self								cancelButtonTitle:@"OK"
otherButtonTitles:nil];						
[alert show];
[alert release];
}
when I use this code the debugger gives me an error that I need to put an ; after each line.
So I put one after each line and my code then looks like this:
Code:
#import "HelloWorldViewController.h"

@implementation HelloWorldViewController

-(IBAction) btnClicked: (id) sender{
	//---display an alert view---
	
UIAlertView *alert = [UIAlertView alloc]; 
initWithTitle:@"Hello World!";								message:@"iPad, here I come!";
delegate:self;								cancelButtonTitle:@"OK";
otherButtonTitles:nil];
[alert show];
[alert release];
}
and then the debugger gives me an error on "otherButtonTitles:nil];"
expected ";" before "]" token.

but I don't know what to do then... everything I try ends up with an other error.

Does anyone know what the source of these very strange errors is?
I'm new at iPad programming/Objective C so please be gentle. :)

I'v looked it up on the internet and that gives me the same code as the original book code. So I don't know why the original code doesn't work...

Best Regards

Bennie98
Reply With Quote
  #2 (permalink)  
Old December 7th, 2010, 09:34 AM
Registered User
 
Join Date: Dec 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

nevermind... I forgot a bracket..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hello world! help :( archer11 BOOK: Beginning iPad Application Development 11 August 24th, 2010 01:27 PM
Hello World Example Chapter 1 goboomer BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 12 January 14th, 2009 10:07 PM
ASP "Hello World" Bill_Thompson ASP.NET 2.0 Basics 3 December 14th, 2007 09:38 AM



All times are GMT -4. The time now is 09:19 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.