Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: XCode problem (For Tom or Keith)

  1. #1
    Senior Member
    Join Date
    Jun 2008
    Location
    Wirral
    Posts
    9,138
    Post Thanks / Like
    I'm already pulling my hair out writing my 'hello world' application and thought I must be doing something really stupid that I haven't noticed, so here are the steps I've taken;

    In the 'helloworld_001ViewController.h' file, I've got the following code;
    Code:
    //
    //  helloworld_001ViewController.h
    //  helloworld_001
    //
    //  Created by Josh Parry on 10/07/2010.
    //  Copyright __MyCompanyName__ 2010. All rights reserved.
    //
    
    #import <UIKit/UIKit.h>
    
    @interface helloworld_001ViewController : UIViewController {
        IBOutlet UILabel *label;
    }
    
    - (IBAction)hello:(id)sendr;
    
    @end
    In the 'helloworld_001ViewController.m' file, I've got the following code;
    Code:
    //
    //  helloworld_001ViewController.m
    //  helloworld_001
    //
    //  Created by Josh Parry on 10/07/2010.
    //  Copyright __MyCompanyName__ 2010. All rights reserved.
    //
    
    #import "helloworld_001ViewController.h"
    
    @implementation helloworld_001ViewController
    - (IBAction)hello:(id)sendr{
        label.text = @"Hello World!";
    }
    In the IB, I've pressed control and dragged a 'fishing line thing' from the file's owner to the label and then selected "label" from the black menu that appears.

    Then I've dragged a 'fishing line thing' from the button to the files owner and selected "hello:" from the black menu that appears. The problem is that once I've hit enter and cmd to run the code in the simulator, the 'Hello World!" label is displayed even though the button isn't pressed.

    Follow Me on Pinterest
    Disney International College Program: May 2011 working in Attractions (Voyage of the Little Mermaid & Disney Junior: Live on Stage!)

  2. #2
    Senior Member
    Join Date
    Jun 2008
    Location
    Wirral
    Posts
    9,138
    Post Thanks / Like
    Ignore this I had typed 'hello world' into the label rather than leaving it blank!

    Something tells me I'm on a looong road to learning this
    Follow Me on Pinterest
    Disney International College Program: May 2011 working in Attractions (Voyage of the Little Mermaid & Disney Junior: Live on Stage!)

  3. #3
    Moderator
    Join Date
    Jul 2008
    Location
    Staffordshire U.K.
    Posts
    5,908
    Post Thanks / Like
    Quote Originally Posted by josh.p., post: 222801
    Ignore this I had typed 'hello world' into the label rather than leaving it blank!

    Something tells me I'm on a looong road to learning this
    Darn it! I was just about to jump in and tell you about this Josh, but seeing as your post was aimed at Tom or Keith, I thought I`d stay out of it!





  4. #4
    Senior Member
    Join Date
    Jun 2008
    Location
    Wirral
    Posts
    9,138
    Post Thanks / Like
    Quote Originally Posted by Slowhand, post: 222816
    Darn it! I was just about to jump in and tell you about this Josh, but seeing as your post was aimed at Tom or Keith, I thought I`d stay out of it!
    I thought this sort of thing would be beneath your level of teck-ni-kal knowledge and I didn't want to waste your's (or dorothy's :wink time!
    Follow Me on Pinterest
    Disney International College Program: May 2011 working in Attractions (Voyage of the Little Mermaid & Disney Junior: Live on Stage!)

  5. #5
    Senior Member
    Join Date
    Oct 2008
    Location
    Cumming, GA. A small suburb of Atlanta.
    Posts
    6,094
    Post Thanks / Like
    Josh,

    Glad you got it sorted out!

    It's a great feeling of accomplishment once you get something working. And now that you've made that mistake for the first time, the next time, you'll know better or be able to find it faster should you make the same mistake again.

    If you want to get started in iPhone programming with the best book on the market, you need to get this one:

    IPhone Programming: The Big Nerd Ranch Guide

    This is by a guy name Aaron Hillegass who runs a place here in town close to where I live called the Big Nerd Ranch. I've met Aaron on a couple of occasions at various Apple events here in town and you couldn't meet a nicer guy. He's also been involved with Cocoa since the original Next days and is probably one of the most technologically smart people I've ever met. I'd dearly love to be able to go to either the Cocoa Boot Camp or the iPhone Boot Camp that he runs. Anyway, his books are probably some of the most definitive texts available today on programming for the Apple platforms. He's also supposed to be working on an OpenGL ES book as it applies to the iPhone platform.

    You won't go wrong if you pick this book up. It's outstanding!

    Just be sure to use the link on the Secrets site if you're going to get it from Amazon!

    Tom (... [information release];

  6. #6
    Administrator keith's Avatar
    Join Date
    Jun 2008
    Location
    United Kingdom
    Posts
    21,308
    Post Thanks / Like
    those are the books I have Tom! I had no idea the ranch was so close to you???
    Disney information? Try our online guidebook at http://wdisneysecrets.com
    Get your own Disney Countdown at http://toys.wdisneysecrets.com







  7. #7
    Senior Member
    Join Date
    Oct 2008
    Location
    Cumming, GA. A small suburb of Atlanta.
    Posts
    6,094
    Post Thanks / Like
    Quote Originally Posted by Keith, post: 222840
    those are the books I have Tom! I had no idea the ranch was so close to you???
    Yep! The Big Nerd Offices are just down in Atlanta. Not too terribly far from where I work when I have to go into the office.

    The actual Ranch itself (where they teach some of the classes) is located at Banning Mills. Maybe an hour and a half drive from my house. It's actually southwest of Atlanta about 45 miles and I live almost due north about 35 miles.

    I really want to take some of the classes there!

    Tom (... approaching Nerdvana!)

  8. #8
    Senior Member
    Join Date
    Jun 2008
    Location
    Wirral
    Posts
    9,138
    Post Thanks / Like
    Thanks Tom, I'll have a look at those books The one I'm using is by Rory Lewis called 'iPhone & iPad apps for absolute beginners' This is the first coding I've really ever done (apart from CSS & HTML) so it's good as it is all explained in layman terms

    I've now got so far as to make 3 'hello world' apps.

    The 1st has a button that you press to display 'hello world'
    The 2nd is 'Hello World' in a table
    The 3rd is 'Hello World' in an editable table (Well, you can click 'edit' and then delete the items in the table)

    Not exactly great but I'm learning

    My aim is to create a reference application for edible weeds for reptiles. Seems a bit boring but it's going to be handy for me when I am out at a garden centre or on a walk and there is a plant I'm not 100% sure is edible or toxic. I just want a simple photo layout with a picture and when clicked I want it to display if it is edible and whether it should fed in moderation, or if it should be fed as a staple part of the diet
    Follow Me on Pinterest
    Disney International College Program: May 2011 working in Attractions (Voyage of the Little Mermaid & Disney Junior: Live on Stage!)

  9. #9
    Administrator keith's Avatar
    Join Date
    Jun 2008
    Location
    United Kingdom
    Posts
    21,308
    Post Thanks / Like
    Quote Originally Posted by catrancher, post: 222841
    I really want to take some of the classes there!
    me too! my ideal few weeks would be a WWDC followed by some classes at the ranch
    Disney information? Try our online guidebook at http://wdisneysecrets.com
    Get your own Disney Countdown at http://toys.wdisneysecrets.com







  10. #10
    Administrator keith's Avatar
    Join Date
    Jun 2008
    Location
    United Kingdom
    Posts
    21,308
    Post Thanks / Like
    Josh keep going with it! With the ipad too, there's a heck of a great opportunity to get your app out there for people and once you get to know it, cocoa is a really nice language to use!

    Just be careful of memory management, that's the best tip I can give you to save you frustration later
    Disney information? Try our online guidebook at http://wdisneysecrets.com
    Get your own Disney Countdown at http://toys.wdisneysecrets.com







Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •