Interface Builder 3.0..Whoa.

Discussion in 'Mac Programming' started by Trekkie, Nov 17, 2007.

  1. Trekkie macrumors 6502a


    Nov 13, 2002
    Wake Forest, NC
    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
  2. Darkroom Guest


    Dec 15, 2006
    Montréal, Canada
    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.
  3. Krevnik macrumors 68040


    Sep 8, 2003
    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.
  4. Trekkie thread starter macrumors 6502a


    Nov 13, 2002
    Wake Forest, NC
    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.
  5. HiRez macrumors 603


    Jan 6, 2004
    Western US
    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.
  6. demallien macrumors regular

    Oct 13, 2005


    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:

    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.
  7. macsig macrumors regular

    Oct 27, 2006
    Marina del Rey, CA

Share This Page