Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning iOS Game Development
This is the forum to discuss the Wrox book Beginning iOS Game Development by Patrick Alessi ; ISBN: 978-1-1181-0732-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning iOS Game Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 25th, 2011, 03:11 PM
Registered User
Points: 29, Level: 1
Points: 29, Level: 1 Points: 29, Level: 1 Points: 29, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default the sampleUI example is strange

in 39 page

the book says like below

#import <UIKit/UIKit.h>
@interface ViewController : UIViewController {
int counter;
}
@property (weak, nonatomic) IBOutlet UILabel *myLabel;
- ( IBAction )buttonPressed:(id)sender;
@property (weak, nonatomic) IBOutlet UISlider *mySlider;
- ( IBAction )sliderMoved:(id)sender;
@end


but this ends with error.

but the source code provided outside of the book itself is like below


#import <UIKit/UIKit.h>
@interface SampleUIViewController : UIViewController {
UIViewController {
UILable *myLable;
IBOoutlet UISLider *mySlider;
int counter;
}
- ( IBAction )buttonPressed:(id)sender;
- ( IBAction )sliderMoved:(id)sender;
@property (strong, nonatomic) IBOutlet UILabel *myLabel
@end


and this source seems to be working fine.



why has the book error data?? the book said that the code will work fine but it`s kinda not.

Last edited by baryonicdm; December 25th, 2011 at 04:38 PM..
 
Old December 25th, 2011, 06:19 PM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Location: Winnipeg, MB Canada
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

[Update: I submitted this to Wrox as Errata. #111228-000495]

Hi There!

The code in the book for this example worked fine for me. But I decided to download the code as well and I think it's messed up. The SampleUIViewController.h file contains three interface implementations(each starting with the "#import <UIKit/UIKit.h>") The last one looks like mine that I created from the books instructions.

Code:
#import <UIKit/UIKit.h>

@interface SampleUIViewController : UIViewController {
    UILabel *myLabel;
    IBOutlet UISlider *mySlider;
    int counter;
}
- (IBAction)buttonPressed:(id)sender;
- (IBAction)sliderMoved:(id)sender;

@property (strong, nonatomic) IBOutlet UILabel *myLabel;

@end

#import <UIKit/UIKit.h>
@interface SampleUIViewController : UIViewController {
UIViewController {
UILable *myLable;
IBOoutlet UISLider *mySlider;
int counter;
}
- ( IBAction )buttonPressed:(id)sender;
- ( IBAction )sliderMoved:(id)sender;
@property (strong, nonatomic) IBOutlet UILabel *myLabel 
@end

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController {
    
    int counter;
}

@property (weak, nonatomic) IBOutlet UILabel *myLabel;

- (IBAction)buttonPressed:(id)sender;

@property (weak, nonatomic) IBOutlet UISlider *mySlider;

- (IBAction)sliderMoved:(id)sender;

@end

Last edited by bpeasey; December 28th, 2011 at 02:51 PM..
 
Old January 2nd, 2012, 02:03 PM
Registered User
Points: 29, Level: 1
Points: 29, Level: 1 Points: 29, Level: 1 Points: 29, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default sorry, my bad

sorry. i`ve just tried again and it works.

i guess i was stupid to wrongly spell something.

thanks for your great book!!



some of my friends has bought your book too!!




Similar Threads
Thread Thread Starter Forum Replies Last Post
Something Strange nabeelalkaff BOOK: ASP.NET 3.5 Website Programming Problem Design Solution 2 December 10th, 2010 03:33 PM
Really Strange... nooor83 BOOK: Professional Ajax ISBN: 978-0-471-77778-6 7 May 7th, 2006 12:51 PM
strange situation Vishal_7 ASP.NET 1.0 and 1.1 Basics 0 December 16th, 2004 07:18 PM
Why do my posts look strange? joefawcett Forum and Wrox.com Feedback 2 December 16th, 2004 12:04 PM
Strange error eraser Classic ASP Basics 3 September 21st, 2004 07:55 AM





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