Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > New Interface Builder is awful

View Poll Results: What do you think of the new Interface Builder
Poll Options:
Better than what we had before 14 votes (93.33%)
A step backwards, I'm reverting to Xcode 2.5 1 votes (6.67%)
Voters: 15. You may not vote on this poll
New Interface Builder is awful
Thread Tools
Geobunny
Mac Elite
Join Date: Oct 2000
Location: Edinburgh, Scotland
Status: Offline
Reply With Quote
Nov 2, 2007, 11:05 PM
 
Is it just me or does anyone else feel that the new Interface Builder with 10.5 is absolutely awful?

Previously it used to be SO easy to work with. Example:
1) Create new project in Xcode
2) Double click MainMenu.nib to open in Interface Builder
3) If you don't already have one, drag a new window from the palette to create one. Drag some UI widgets onto it.
4) Go to "Classes" tab of main NIB window, click for example NSObject, create subclass from the Classes menu and give it a name.
5) Classes menu -> Instantiate "MyObject"
6) Double click your newly instantiated object and the inspector palette opens up already at the Outlets/Actions tab, ready for you to create them as necessary.
7) Classes menu -> Create files for "MyObject" and it saves the skeleton of your object along with a header file and even adds it to the Xcode project. Now all that's left to do is beef out the code within Xcode itself.

Now with the new Interface Builder I can't figure any of that out, granted I'm really tired right now but it definitely doesn't work the same way as before and it's certainly not obvious how to do it.

Also, I really dislike the new "library" window. The old panel/palette was so much more efficient - click on the "text fields" tab and all the text fields are shown at once to choose from. Now, we have to opt for either a silly drop down menu or a massive library window....and don't even get me started on the Inspector!

Does anyone else agree with me or do you all think it's an improvement?
ClamXav - the free virus scanner for Mac OS X | Geobunny learns to fly
     
Thinine
Mac Elite
Join Date: Jul 2002
Status: Offline
Reply With Quote
Nov 3, 2007, 03:50 PM
 
Originally Posted by Geobunny View Post
Now with the new Interface Builder I can't figure any of that out, granted I'm really tired right now but it definitely doesn't work the same way as before and it's certainly not obvious how to do it.
Here's your problem. They changed the way it works. It wasn't obvious before, and it's not now. Check Apple's updated docs for help.
     
alex_kac
Grizzled Veteran
Join Date: Aug 2002
Location: Central Texas
Status: Offline
Reply With Quote
Nov 3, 2007, 04:21 PM
 
IB 3/XCode 3 - they want you to use XCode for all classes. So IB 3 will auto-sync all changes from XCode. But create your classes in XCode, not IB.
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Nov 3, 2007, 06:23 PM
 
1. Create a class in Xcode.
2. Drag out a generic object from Interface Builder's object library.
3. Set the object's class to the class you created in Xcode.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
black bear theory
Grizzled Veteran
Join Date: Aug 2005
Location: fairbanks AK
Status: Offline
Reply With Quote
Nov 3, 2007, 09:18 PM
 
i never used interface builder to make classes. always did them in xcode and then imported them into interface builder as needed.

i am confused on some aspects of the new interface builder 3.0. for instance, how do i move an object once it's placed in a window. i get the hand cursor when i hover over it, but the intuitive thing to do (click and drag) doesn't work. i can resize the edges of the element but that is all ...

is this just my problem?
Earth First! we'll mine the other planets later.
     
alex_kac
Grizzled Veteran
Join Date: Aug 2002
Location: Central Texas
Status: Offline
Reply With Quote
Nov 4, 2007, 12:26 AM
 
Also here is something from the Cocoa list (these sort of questions would be best would be in the XCode/Cocoa lists)

According to info during Leopard tech Talks, early 2007, Stockholm,
Sweden,
Interface Builder 3 won't have code generation. Create your class in
Xcode, and then tell interface builder
to parse the header file.
While this is the straightforward workflow, Interface Builder 3 does
still support generating classes and code -- more flexibly than
Interface Builder 2, too!

You can drag an object out of the Library window and into your IB
document or an IB editor window, and then Get Info on it and change
its class to anything you want. There, you have a subclass. You can
generate a file for this class by choosing "Write Class Files..." from
the File menu while in the Identity Inspector for that object.

Or you can simply select an outlet or action that you've added in the
Identity Inspector, use the Copy command, and then go to the class's
header file and choose Paste. That will put a declaration for that
outlet or action into the header.

Note that you can generate not just stub Objective-C code and headers,
but also Python and Ruby code for PyObjC and RubyCocoa, respectively!

-- Chris
     
goMac
Posting Junkie
Join Date: May 2001
Location: Portland, OR
Status: Offline
Reply With Quote
Nov 4, 2007, 04:42 AM
 
Yeah, it seems like most the fuss with IB3 is just people getting familiar with where features moved.
8 Core 2.8 ghz Mac Pro/GF8800/2 23" Cinema Displays, 3.06 ghz Macbook Pro
Once you wanted revolution, now you're the institution, how's it feel to be the man?
     
Thinine
Mac Elite
Join Date: Jul 2002
Status: Offline
Reply With Quote
Nov 4, 2007, 03:49 PM
 
Yeah, once I figured out the "drag an Object object from the IB library" part of the tutorial, I understood it all. It's awesome, especially right-click dragging to link parts of the UI.
     
sikosis2
Fresh-Faced Recruit
Join Date: Mar 2006
Status: Offline
Reply With Quote
Nov 28, 2007, 05:18 AM
 
I'm completely lost as well ... I dragged an NSObject from the Library but there's nothing I can do with it. Can't rename it or Instantiate it ...

There is a Get Info button, but that does nothing when I have the "Object" selected. I can go to File | Write Class Files ... which then wants to create an NSObject file ... and wants to save it my Documents and not with the Project. Bringing up the Inspector as well says "Not Applicable"

Please add some screenshots ... because I'm totally lost and confused - can't even follow along with Aaron Hillegass's Cocoa Programming for Mac OS X 2nd edition book.
( Last edited by sikosis2; Nov 28, 2007 at 05:29 AM. Reason: added more)
     
Geobunny  (op)
Mac Elite
Join Date: Oct 2000
Location: Edinburgh, Scotland
Status: Offline
Reply With Quote
Nov 28, 2007, 04:20 PM
 
Originally Posted by sikosis2 View Post
I'm completely lost as well ... I dragged an NSObject from the Library but there's nothing I can do with it. Can't rename it or Instantiate it ...

There is a Get Info button, but that does nothing when I have the "Object" selected. I can go to File | Write Class Files ... which then wants to create an NSObject file ... and wants to save it my Documents and not with the Project. Bringing up the Inspector as well says "Not Applicable"

Please add some screenshots ... because I'm totally lost and confused - can't even follow along with Aaron Hillegass's Cocoa Programming for Mac OS X 2nd edition book.

OK, it takes some getting used to (and quite often b*ggers up old style IB2 nib files but I'll ignore that for the time being) but you have to start everything from Xcode now. IB doesn't do code generation at all any more, so as a very simple example, I'll guide you through connecting a button up with an action:

1) Start a new project in Xcode
2) Add a new cocoa class to your project (note the distinction between cocoa-java and cocoa-obj-C has gone now; Java is deprecated sadly)
3) Write the code for your new class file (or at the very least provide function prototypes in the .h file); save the file.
4) From Xcode's side bar, double click MainMenu.nib to open it in IB.
5) Only then can you drag the NSObject icon from IB's Library into your nib file. This creates an instantiated NSObject to which you must assign your newly created class by using the "Identity" section of the Inspector pallet.
6) Control-click and drag from a button in your interface to the object and connect up the action as required.
7) Save and go back to Xcode. Hit cmd-R (build & run) to see it work.
ClamXav - the free virus scanner for Mac OS X | Geobunny learns to fly
     
Thinine
Mac Elite
Join Date: Jul 2002
Status: Offline
Reply With Quote
Nov 28, 2007, 05:09 PM
 
Like the email posted above, you can have IB generate code for you, but it's better to do it from Xcode, as IB monitors those files and will update automatically.
     
TheoCryst
Mac Elite
Join Date: Nov 2005
Location: Seattle, WA, USA
Status: Offline
Reply With Quote
Nov 28, 2007, 06:52 PM
 
I'm starting to get the hang of where everything has been moved, and I must say that I like it quite a lot better. Granted, its liberal use of real estate makes my 13" screen feel very cramped, but that's an unrelated issue.

Any ramblings are entirely my own, and do not represent those of my employers, coworkers, friends, or species
     
   
Thread Tools
 
Forum Links
Forum 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 On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:41 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,