• 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: Bill Bumgarner <email@hidden>
  • Date: Sat, 30 May 2009 11:17:18 -0700

On May 30, 2009, at 11:09 AM, Gwynne Raskind wrote:
On May 30, 2009, at 1:01 PM, Jonathan Mast wrote:
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.

To create HelloCocoa is to spend 30 seconds in Interface Builder creating a window with a clickable button in it and then another 30 seconds in Xcode writing the action method that prints "Hello Objective-C!" (or whatever you want).


That *is* the equivalent.

In short, it's much more complex to do a nibless Cocoa app than whatever the Java equivelant is.

Of course it is. Nibless Cocoa applications are possible, but hard. For a reason. It isn't the recommended or supported way of writing a Cocoa application.


(I have seen this particular line of investigation repeated about once every 3 months for the nearly 20 years that I have been writing Cocoa code. It is, ultimately, a waste of time.)

b.bum
_______________________________________________
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


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>)
 >Re: Writing Cocoa apps w/o using Interface Builder (From: Jonathan Mast <email@hidden>)
 >Re: Writing Cocoa apps w/o using Interface Builder (From: Gwynne Raskind <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