• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Writing Cocoa apps w/o using Interface Builder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing Cocoa apps w/o using Interface Builder


  • Subject: Re: Writing Cocoa apps w/o using Interface Builder
  • From: Jonathan Mast <email@hidden>
  • Date: Sat, 30 May 2009 13:01:11 -0400

Joar,
I haven't really tried creating a Cocoa app programmatically.  What I saw in the iPhone tutorial about doing such seemed to required quite a bit of boilerplate code.  I guess that was IB is supposed to shield us from ;)

Finlay,
I agree that Objective-C is a better choice than C++.  I would really like to learn it's SmallTalk-based syntax the same way I taught myself Java: with simple, programmatic GUI programs.  This approach is very rapid and allows to one to learn any language (not just the GUI framework) very quickly.  I got so angry with Xcode/IB because this Apple seemed to have nerfed this possibility with the way they architected Cocoa.

Everyone,
Could someone please post a "HelloCocoa" equivalent to this Java program:
<code>
package example;

import javax.swing.*;

public class HelloJava {
    public static void main(String[] args) {
        JFrame jf = new JFrame();
        JPanel jp = new JPanel();
        jp.add(new JButton("Hello Java!"));
        jf.setContentPane(jp);
        jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        jf.pack();
        jf.setVisible(true);
    }
}
</code>

The only this program does is create a window with a clickable button in it. 

Thanks

On Sat, May 30, 2009 at 11:30 AM, colo <email@hidden> wrote:
If your making a game or a custom interface you have no option but to
learn how to program an interface without IB
other than creating the first UIView controller in IB it's stupid not
to know how to do it by code.

Unless your just making a normal table based app you have no choice as
my experience learning it has gone about.



On Sat, May 30, 2009 at 7:12 AM, Finlay Dobbie <email@hidden> wrote:
> On Fri, May 29, 2009 at 10:06 PM, Jonathan Mast
> <email@hidden> wrote:
>> No offense taken, Seth.  I figured out the issue and indeed it was a missed
>> connection in IB.  And while my previous comments were hyperbolic, I still
>> think Apple could have done better with Cocoa/InterfaceBuilder.  Either they
>> could have made IB more intuitive and/or Cocoa easier to manipulate
>> programmatically.  I just expect more from Apple I guess.
>
> I actually found IB to be far more intuitive than most other
> environments. Similarly, I find that Objective-C is much simpler and
> more intuitive than C++.
>
> Much of the initial griping and whining about the Apple environment
> ("OMG THESE SQUARE BRACKETS ARE UGLY", "IB IS BROKEN", "COCOA IS
> UNINTUITIVE" etc) come down to the fact that it is different from
> whatever previous environment you were used to. However, this is not
> really Apple's failing: there are often good reasons why they have
> approached things differently. These may not be immediately obvious
> whilst your brain is still contorted into weird shapes from dealing
> with environment X or environment Y.
>
> Good engineers accept that there are differences between environments
> and languages, new concepts to be learned, and new applications of
> existing concepts to discover. The best engineers see this as an
> opportunity, not a burden.
>
>  -- Finlay
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Writing Cocoa apps w/o using Interface Builder
      • From: Sam Krishna <email@hidden>
    • Re: Writing Cocoa apps w/o using Interface Builder
      • From: Hamish Allan <email@hidden>
    • Re: Writing Cocoa apps w/o using Interface Builder
      • From: Simon Wilson <email@hidden>
    • Re: Writing Cocoa apps w/o using Interface Builder
      • From: Gwynne Raskind <email@hidden>
References: 
 >Writing Cocoa apps w/o using Interface Builder (From: Jonathan Mast <email@hidden>)
 >Re: Writing Cocoa apps w/o using Interface Builder (From: Chris Williams <email@hidden>)
 >Fwd: Writing Cocoa apps w/o using Interface Builder (From: Jonathan Mast <email@hidden>)
 >Re: Writing Cocoa apps w/o using Interface Builder (From: Seth Willits <email@hidden>)
 >Re: Writing Cocoa apps w/o using Interface Builder (From: Jonathan Mast <email@hidden>)
 >Re: Writing Cocoa apps w/o using Interface Builder (From: Finlay Dobbie <email@hidden>)
 >Re: Writing Cocoa apps w/o using Interface Builder (From: colo <email@hidden>)

  • Prev by Date: Re: Writing Cocoa apps w/o using Interface Builder
  • Next by Date: Re: Writing Cocoa apps w/o using Interface Builder
  • Previous by thread: Re: Writing Cocoa apps w/o using Interface Builder
  • Next by thread: Re: Writing Cocoa apps w/o using Interface Builder
  • Index(es):
    • Date
    • Thread