Interface Builder 2.5 toolbars???

Discussion in 'Mac Programming' started by Drew017, Dec 13, 2011.

  1. macrumors 65816

    Drew017

    Joined:
    May 29, 2011
    Location:
    East coast, USA
    #1
    Hello- I'd like to know how to add a toolbar to a window in interface builder 2.5. For some reason, there is no NS toolbar in version 2.5, and I'd like to know how to get a toolbar in a window. In the item inspector, there is a unify toolbar option, but no toolbar. Help!??
     
  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
  3. thread starter macrumors 65816

    Drew017

    Joined:
    May 29, 2011
    Location:
    East coast, USA
    #3
    I tried that, but I can't get it to work, or maybe I don't know how... Can someone help!?
     
  4. macrumors regular

    Joined:
    Mar 5, 2006
    #4
    If kainjow's suggestion didn't work, you'll have to create the toolbar in your code. Apple didn't add toolbar support to Interface Builder until Xcode 3.
     
  5. thread starter macrumors 65816

    Drew017

    Joined:
    May 29, 2011
    Location:
    East coast, USA
  6. macrumors regular

    Joined:
    Mar 5, 2006
    #6
    I have never created a toolbar programmatically, but I guess you would add the code to the awakeFromNib: method or to the window's initialization code. The following article may help you:

    NSToolbar Basics
     
  7. thread starter macrumors 65816

    Drew017

    Joined:
    May 29, 2011
    Location:
    East coast, USA
    #7
    I'm new to programming, and I'd like to know where I need to put the code to create a toolbar
     
  8. macrumors regular

    Joined:
    Mar 5, 2006
    #8
    The article I linked to in my last post tells you where to put the code. If you're new to programming, I recommend starting with something simpler than programming a toolbar. The following article should help you:

    Getting Started with Mac Programming
     
  9. macrumors 6502a

    Joined:
    Dec 29, 2009

Share This Page