PDA

View Full Version : Interface Builder 3.0..Whoa.




Trekkie
Nov 17, 2007, 12:46 PM
OK, Just when I thought I'd finally gotten the hang of the basics of Interface Builder the new leopard version comes along and throws me a curveball.

Not been having a lot of luck finding an idiots guide for it. I'm sure someone is writing one, and I'm probably going to need to 'upgrade' my now two versions behind Aaron Hillegass book when they update it for Leopard to help me figure this out.

It seems to me that I'm missing something rather large. I just wanted to program a simple app that would ask for some input, you hit calculate, and it gives you a number. Several of the inputs are hard coded list of 1 - 5. I used the popup button to make those, and I can't for the life of me figure out how to interact with the thing other than changing the Item1, Item2, and Item3 it shows.

I'm probably missing something large as I was never an event driven program guy and never really learned how to use any platforms web interface builder. I always did regular C, limited object oriented stuff that was mostly a text console based thing. So figuring out how to make the screen portion is got me lost, and IB3 has made me really lost.

Any good suggestions on where I could start? I've thumbed through the developer documentation Apple provides but it assumes I know a few things that I think I don't. Thanks



Darkroom
Nov 18, 2007, 07:38 AM
i'm fairly new to developing also, but i find the IB3 interface much easier than !B2.4... i prefer the new library window as opposed to the old... it's all about the inspector window being open (apple+shift+i), then highlight one of your objects in the NIB to see/edit the respective info in the inspector window.

Krevnik
Nov 18, 2007, 12:50 PM
It seems to me that I'm missing something rather large. I just wanted to program a simple app that would ask for some input, you hit calculate, and it gives you a number. Several of the inputs are hard coded list of 1 - 5. I used the popup button to make those, and I can't for the life of me figure out how to interact with the thing other than changing the Item1, Item2, and Item3 it shows.

Popup Buttons have menus attached to them, and when you are editing the items list, you are really editing a menu. Treat it the same way as you would any other menu (drag the menu item object from the library, and add it to the menu).

IIRC, this is also how you were "supposed" to edit Popup Buttons in IB 2 as well.

Trekkie
Nov 18, 2007, 01:44 PM
I've drug it from the library onto the page. The problem is, it only has three items, and there appears to be no way to add to the item list that I can figure out looking at the inspector, or various cmd/option/left clicks on the button itself.

HiRez
Nov 18, 2007, 03:07 PM
I've drug it from the library onto the page. The problem is, it only has three items, and there appears to be no way to add to the item list that I can figure out looking at the inspector, or various cmd/option/left clicks on the button itself.In IB2, at least, you drag new MenuItems into the popup (which you might have to have open to do). Then you can edit them or move them around in the menu. If your list is long and/or dynamic, you'll probably want to do all that programmatically in awakeFromNib: instead of manually in IB.

demallien
Nov 19, 2007, 04:55 AM
Trekkie,

Like you, I mostly code in pure C, but I have from time to time done a UI for the Mac. Apple does have some pretty good tutorials describing how to hook up InterfaceBuilder objects to your code. for example, I was looking at a tutorial on how to hook up a Ruby app using the RubyCocoa bridge the other day - the process is very straightforward. Have a look here:
http://developer.apple.com/documentation/Cocoa/Conceptual/RubyPythonCocoa/index.html#//apple_ref/doc/uid/TP40004936

I know that I have seen other good tutorials on the Apple Developer site for basic Cocoa work, but I don't have time to dig them up for you. I promise you however that they do exist, so if you haven't found them yet, just keep searching the Apple Developer site...

Hope that helps.

macsig
Nov 20, 2007, 07:08 PM
this version is really better