cocoa/interface builder question

Discussion in 'Mac Programming' started by DJPaul, Nov 1, 2007.

  1. DJPaul macrumors newbie

    Oct 26, 2007
    Hi all, i'm new to Cocoa and Interface Builder (both on Leopard), so you'll have to excuse me.

    I'm part way through designing the interface for an application that looks similar to - by that, I mean an NSOutlineView up the left hand side of the window, and the main content area to right. I've also got a toolbar running across the top of the window.

    I want to add a mini-toolbar along the bottom of the window. I have seen these referred to as "bottom button bars" or "status bars" across the web. I would appreciate some pointers how to start doing this. e.g. this bar 1.png) from Mail.

    I've tried the obvious things - IB doesn't let me add > 1 toolbar to a window. I can't drag a window into another window, either (to try to get the background colour/texture of the panel). So... I created a Custom View along the bottom of the screen, and have written some code so it colours this view's area in a lovely green colour. ;)

    I've dragged some buttons on top of my Custom View, which render on top - so essentially, this way would work if someone could tell me how I get the View to render the appropriate coloured background**. Unless this is the wrong approach? in which case pointers as to the "correct" method would be appreciated.

    **By this I mean; what's the best/official/flavour of the week/most standard colour scheme now in Leopard? e.g. As far as I can see, it's between the Finder vs Mail - Finder has a much darker bar along the bottom of the window, whereas Mail has a much lighter one.
    I am leaning towards the lighter version; either way, I would need to draw this texture/colour into my Custom View. How can I do this?

    Many thanks for reading and for your help
  2. kainjow Moderator emeritus


    Jun 15, 2000
  3. sdfilter macrumors newbie

    Nov 6, 2007
    Yeah, the change from IB 2 to IB 3 is driving me nuts. I'm working my way through Hillegass, and really struggling to make the change.

    For example, in the discussion of CustomViews, he describes the process of generating the files for the class and then extending them. However, I can't figure out the process in IB 3. The classes tab is gone, so the process has changed pretty significantly. The best I've come up with:

    1. Drag a CustomView.
    2. From File menu, Write Class Files
    3. Go to X Code and manually add the generated files to the project.
    4. Inspect the generated header file and realize that it doesn't even extend NSView, so manually add all the "stuff" that used to be generated by IB 2.

    Clearly I'm doing this incorrectly, but I can't find any guidance regarding the correct approach.
  4. devman macrumors 65816


    Apr 19, 2004
  5. sdfilter macrumors newbie

    Nov 6, 2007
    Thanks Devman. I clearly got a bit ahead of myself and skimmed the docs too quickly. Don't know how I managed to miss this.

Share This Page