How do I create a toolbar in Cocoa? (Im new to Mac OS X development)

How do I add a toolbar to an app in Cocoa. Iam new to Cocoa, but am familiar with C#. Please include step by step directions.

How do I add a toolbar to an app in Cocoa. Iam new to
Cocoa, but am familiar with C#. Please include step
by step directions.
Hi Mateusz,
You should find the following links useful. I'm learning toolbars at the moment and the ADC was my first place to look.
Sample Code:
http://developer.apple.com/samplecode/ToolbarSample/index.html#//apple_ref/doc/u id/DTS10000413
Apple PDF:
http://developer.apple.com/documentation/Cocoa/Conceptual/Toolbars/Toolbars.pdf
Hope this helps.
PowerMac G5 1.6Ghz   Mac OS X (10.4.6)   4 gig RAM & NVidia 6800 Ultra

Similar Messages

  • How do I create a second I Tunes library on my Mac computer?

    How do I create a second I Tunes Library on my Mac computer?

    Hold down the option key while starting iTunes.
    It's up to you but sometimes it helps to provide more details as to why you want to do this.  What I told you may not necessarily be the best answer in all situations.

  • How do i create space in my start up disk on mac book pro?

    how do i create space in my start up disk on mac book

    For information about the Other category in the Storage display, see this support article. If the Storage display seems to be inaccurate, try rebuilding the Spotlight index.
    Empty the Trash if you haven't already done so. If you use iPhoto, empty its internal Trash first:
              iPhoto ▹ Empty Trash
    Do the same in other applications, such as Aperture, that have an internal Trash feature. Then restart the computer. That will temporarily free up some space.
    According to Apple documentation, you need at least 9 GB of available space on the startup volume (as shown in the Finder Info window) for normal operation—not the mythical 10%, 15%, or any other percentage. You also need enough space left over to allow for growth of the data. There is little or no performance advantage to having more available space than the minimum Apple recommends. Available storage space that you'll never use is wasted space.
    When Time Machine backs up a portable Mac, some of the free space will be used to make local snapshots, which are backup copies of recently deleted files. The space occupied by local snapshots is reported as available by the Finder, and should be considered as such. In the Storage display of System Information, local snapshots are shown as  Backups. The snapshots are automatically deleted when they expire or when free space falls below a certain level. You ordinarily don't need to, and should not, delete local snapshots yourself. If you followed bad advice to disable local snapshots by running a shell command, you may have ended up with a lot of data in the Other category. Ask for instructions in that case.
    See this support article for some simple ways to free up storage space.
    You can more effectively use a tool such as OmniDiskSweeper (ODS) or GrandPerspective (GP) to explore the volume and find out what's taking up the space. You can also delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one. Note that ODS only works with OS X 10.8 or later. If you're running an older OS version, use GP.
    Deleting files inside an iPhoto or Aperture library will corrupt the library. Any changes to a photo library must be made from within the application that created it. The same goes for Mail files.
    Proceed further only if the problem isn't solved by the above steps.
    ODS or GP can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    If you have more than one user account, make sure you're logged in as an administrator. The administrator account is the one that was created automatically when you first set up the computer.
    Install the app you downloaded in the Applications folder as usual. Quit it if it's running.
    Triple-click anywhere in the corresponding line of text below on this page to select it, then copy the selected text to the Clipboard by pressing the key combination command-C:
    sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    sudo /Applications/GrandPerspective.app/Contents/MacOS/GrandPerspective
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing command-V. You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. Ignore any other messages that appear in the Terminal window.
    The application window will open, eventually showing all files in all folders, sorted by size. It may take a few minutes for the app to finish scanning.
    I don't recommend that you make a habit of doing this. Don't delete anything as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means. When in doubt, leave it alone or ask for guidance.
    When you're done with the app, quit it and also quit Terminal.

  • How do I create and move photos to a new folder on the iphone4?

    How do I create and move photos to a new folder on the iphone4?

    The way I do it is through iTunes.  First you have to have to import or already have the photos in your computer where you have iTunes and sync your phone.  When you have your phone connected and iTunes open click on the iphone under "devices" in the left sidebar list - then over to the right select Photos then Sync Photos and probably best to check selected folders unless you want them all, then choose the photo folders you want.  You have to have your photos in folders for multiple folders to be created in your phone, the names will be the same as the folders in your computer.  Alternately you can sync from one of your photo programs if they are listed as options and they will go to the phone in the structure you have your photos in in that program. 
    Hope this helps... There may be other ways and other third-party programs for doing this but I haven't looked...

  • How do i download my iPad apps to this new company mac?

    how do i transfer my ipad apps to this new company mac?

    Be careful even connecting the iPad to the new Mac, you could erase everything if you aren't careful and don't know what you're doing.
    If it's a work Mac and a personal iPad, there is no reason the twain should meet. The most that you can do is store iPad content in the iTunes libraries on the Mac. As Ralph mentioned, iPad apps don't run on Macs and vice versa.

  • How can I create Tracking-Areas in Cocoa-Applescript?

    How can I create multiple tracking areas that activate handlers that are specific to a certain area, when the mouse enters that area, in Cocoa-Applescript, Xcode 5?

    You can use NSTrackingArea to set up the area(s) you want to track.  For example, if you have a view named "myView" that you wanted to use, you can set up a tracking area by specifying the rectangle (I am going to use the entire view) and tracking options with something like:
       set options to (current application's NSTrackingMouseEnteredAndExited as integer) + (current application's NSTrackingActiveInKeyWindow as integer) + (current application's NSTrackingInVisibleRect as integer)
       set trackingArea to current application's class "NSTrackingArea"'s alloc's initWithRect:(myView's frame()) options:options owner:me userInfo:"tracking myView"
       myView's addTrackingArea:trackingArea
    The options are a bit wordy, but they determine how things are tracked - you could also just look up what they are in the class headers and use that.  You then need to add NSResponder handlers in the owner class for what you are interested in - for this example, they would be:
      on mouseEntered:theEvent -- cursor has entered a tracking rectangle
        log "mouseEntered"
        log theEvent's userData() -- data specific to a trackingArea
      end mouseEntered:
      on mouseExited:theEvent -- cursor has exited a tracking rectangle
        log "mouseExited"
        log theEvent's userData() -- data specific to a trackingArea
      end mouseExited:
    When using multiple tracking areas, you can add some user info that can be retrieved from the event.  In the above example, I used the string "tracking myView", but it can be whatever you want.

  • How can I create a toolbar

    How can I create a tool bar with a functions defined by the user .? For example on the case of explorer on windows there exists a tool bar which can capable to opt tools which been pre determined .How can this be make possible in my application using Labview ?

    Well, a pop up menu is not like a tool bar, but you can find one example here.
    In general, if you want the menu to open more screens, you will need to create and call those as subVIs.
    If this still doesn't help you, I suggest you explain your problem in more detail, and maybe post a screenshot of the what you want to get (no BMPs, please).
    To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
    Try to take over the world!

  • How do I create a Skype Name in this new environme...

    For a variety of reasons, I have created a new Microsoft Account. In attempting to set it up with Skype, I was never asked to create a Skype Name. This has created issues sining into Skype, as well as telling people how to Skype me. I do NOT want to give them my email address as my Skype contact. A Skype name is much more suited for this situation.
    How do I create a Skype name that people can use to call me?
    This beggs the question of why Loging into Skype and idnetification is co complicated. Associated with this one account there are the following methods of primary identification: Skype Name, Microsoft Account, Display Name, Skype Community Name, and there seems to be an additional display name for each Skype accont in the Community which begins with live: and then a modified form of the user's email address. That is A LOT to remember. I had a difficult time just logging in because it asks for my Skype name and the blank would not accept any of the aforementioned identifications. I had to get here by signing into Skype Desktop and then clicking a link to go through rather than signing in. The sign in would not accept my credentials.
    Bottom line is all these issues would go away if I could figure out how to get a skype name.

    See this:
    http://community.skype.com/t5/Security-Privacy-Trust-and/New-to-Skype-and-having-trouble-signing-in/...

  • How do I create a table that breaks for new pages?

    I'm running Pages 5.5.1 on OS X Yosemite 10.10.1 and am having difficulty understanding table behavior.
    Scenario 1 - I create a new file and insert a table at the top of the first (blank) page.  It automatically is selected for Object Placement>Move With Text.  If I add rows to this table, Pages automatically adds a new page and breaks the table so that additional cells appear on the new page.  All well and good.  If I change the Object Placement to Stay on Page, the second page and those cells disappear.
    Scenario 2 - I create a file and first add a few lines to the top of the first page.  Then, I insert a table below those lines.  It is also automatically selected for Object Placement>Move With Text.  When I add rows, the table does not break for the second page, but the entire table jumps to the second page.  If I change the Object Placement to Stay on Page, I can then slide the table back onto page one, but as in Scenario 1 the portion of the table which would continue onto page two disappears.
    So, how do I create a table that I can add to a page which is not blank (as in Scenario 2) which will break automatically onto page 2 instead of jumping, and so the rows appear on page two (not disappear as I describe above)?
    Thank you for your help.

    The inline table is supposed to break but like most things Pages 5 it is buggy and erratic in its behavior.
    Use Pages '09.
    Peter

  • How do I create a context menu in the new CL_SALV

    I like a function xx in context menu. How do I create a context menu in the  CL_SALV ?
    thank you!
    CLASS lcl_event_handler DEFINITION.
      PUBLIC SECTION.
        TYPES: t_proc TYPE zmp_c00_pr_d,
               tt_proc TYPE STANDARD TABLE OF t_proc,
               tt_proces_subpr TYPE TABLE OF ltyp_proces_subpr.
        CLASS-DATA: lr_context TYPE REF TO cl_gui_alv_grid,
        r_selections TYPE REF TO cl_salv_selections,
        lr_menu type ref to cl_ctmenu.
        CLASS-METHODS: main CHANGING ct_zmp_c00_pr_d TYPE tt_proc
                                     ct_proces_subpr TYPE tt_proces_subpr
                                     cv_screen TYPE i.
      PRIVATE SECTION.
        CLASS-DATA lt_zmp_c00_pr_d TYPE TABLE OF zmp_c00_pr_d.
        CLASS-DATA ls_process TYPE zmp_c00_pr_d.
        CLASS-METHODS: handle_double_click
                   FOR EVENT double_click  OF cl_salv_events_table
                   IMPORTING row column,
                   detail
                   IMPORTING l_objkey TYPE zmp_c00_pr_d-objkey.
    ENDCLASS.                    "lcl_events DEFINITION
    * CLASS lcl_event_handler IMPLEMENTATION
    CLASS lcl_event_handler IMPLEMENTATION.
      METHOD main.
        DATA: lr_alv TYPE REF TO cl_salv_table,
              lr_events TYPE REF TO cl_salv_events_table,
              lr_columns TYPE REF TO cl_salv_columns,
              lt_col_tab TYPE salv_t_column_ref.
        FIELD-SYMBOLS <column> LIKE LINE OF lt_col_tab.
        IF r_container IS INITIAL.
          CREATE OBJECT r_container
            EXPORTING
              container_name              = 'CONTAINER'
            EXCEPTIONS
              cntl_error                  = 1
              cntl_system_error           = 2
              create_error                = 3
              lifetime_error              = 4
              lifetime_dynpro_dynpro_link = 5
              OTHERS                      = 6.
          IF sy-subrc <> 0.
            MESSAGE i004(z_pm_tool).
          ENDIF.
    *Für Dynpro 1400
          IF cv_screen = '1400'.
            TRY.
                CALL METHOD cl_salv_table=>factory
                  EXPORTING
    *    list_display   = IF_SALV_C_BOOL_SAP=>FALSE
                    r_container    = r_container
                  IMPORTING
                    r_salv_table   = r_alv
                  CHANGING
                    t_table        = ct_proces_subpr.
              CATCH cx_salv_msg .
            ENDTRY.
            TRY.
    * zeige die Daten
                r_alv->display( ).
                IF sy-subrc NE 0.
                  MESSAGE i001(z_pm_tool).
                ENDIF.
              CATCH cx_salv_msg.
            ENDTRY.
          ENDIF.
    * Für Dynpro 1100
          TRY.
              CALL METHOD cl_salv_table=>factory
                EXPORTING
    *    list_display   = IF_SALV_C_BOOL_SAP=>FALSE
                  r_container    = r_container
                IMPORTING
                  r_salv_table   = r_alv
                CHANGING
                  t_table        = ct_zmp_c00_pr_d  .
            CATCH cx_salv_msg .
          ENDTRY.
          TRY.
    * zeige die Daten
              r_alv->display( ).
              IF sy-subrc NE 0.
                MESSAGE i001(z_pm_tool).
              ENDIF.
            CATCH cx_salv_msg.
          ENDTRY.
    *Ereignisobjekt holen
          lr_events = r_alv->get_event( ).
    ** get the SELECTIONS object
    *r_selections = r_alv->get_selections( ).
    * Interne-Tabelle füllen und an die Methode handle_double_click übergeben
          LOOP AT ct_zmp_c00_pr_d INTO ls_process.
            APPEND ls_process TO lt_zmp_c00_pr_d.
          ENDLOOP.
    * Zeiger auf Container für Kontexmenu
          CREATE OBJECT lr_context
            EXPORTING
              i_parent = r_container.
          DATA: lt_events TYPE cntl_simple_events.
          CALL METHOD lr_context->set_registered_events
            EXPORTING
              events                    = lt_events
            EXCEPTIONS
              cntl_error                = 1
              cntl_system_error         = 2
              illegal_event_combination = 3
              OTHERS                    = 4.
          IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    * Interne-Tabelle füllen und an die Methode handle_double_click übergeben
          LOOP AT ct_zmp_c00_pr_d INTO ls_process.
            APPEND ls_process TO lt_zmp_c00_pr_d.
          ENDLOOP.
    * Event: Add Function
          SET HANDLER: on_added_function FOR lr_events.
    * Event: Kontexmenu
    *      SET HANDLER: on_context_menu_request FOR lr_context.
    * Event: Doppelklick
          SET HANDLER handle_double_click FOR lr_events.
    * get the SELECTIONS object
          r_selections = r_alv->get_selections( ).
    * Einzelne Spalte holen
          lr_columns = r_alv->get_columns( ).
    * Doppelklick funktioniert nur auf das Feld OBJKEY
          LOOP AT lt_col_tab ASSIGNING <column>.
            <column>-r_column->set_output_length( 20 ).
            IF <column>-columnname = 'OBJKEY'.
              <column>-r_column->set_visible( 'X' ).
            ELSE.
              <column>-r_column->set_visible( ' ' ).
            ENDIF.
          ENDLOOP.
          IF lt_col_tab IS NOT INITIAL AND sy-subrc <> 0.
            MESSAGE i002(z_pm_tool).
          ENDIF.
        ENDIF.
      ENDMETHOD.                    "main
      METHOD handle_double_click.
        FIELD-SYMBOLS <fs_zmp_c00_pr_d> TYPE zmp_c00_pr_d.
        READ TABLE lt_zmp_c00_pr_d INDEX row ASSIGNING <fs_zmp_c00_pr_d>. " vor dem Changing Parameter der Klasse
    *    READ TABLE ct_zmp_c00_pr_d INDEX row ASSIGNING <fs_zmp_c00_pr_d>.
        IF sy-subrc <> 0.
          RETURN.
        ENDIF.
        IF column = 'OBJKEY'.
          lcl_event_handler=>detail( <fs_zmp_c00_pr_d>-zz_slotid_a ).
        ENDIF.
      ENDMETHOD.                    "handle_double_click
      METHOD detail.
        DATA: lr_alv TYPE REF TO cl_salv_table,
              lt_alv_tab TYPE TABLE OF zmp_p00_sp_d.
    * Subprozess holen
        SELECT * FROM zmp_p00_sp_d INTO TABLE lt_alv_tab
          WHERE objkey = l_objkey.
        IF sy-subrc <> 0.
          MESSAGE i003(z_pm_tool).
        ENDIF.
        TRY.
    * Neu erzeugte Instanz für ALV-Tabellenobjekt holen
            cl_salv_table=>factory( IMPORTING r_salv_table = lr_alv
                                     CHANGING t_table = lt_alv_tab ).
    * Ausgabe Fenster für SubScreens
            lr_alv->set_screen_popup( start_column = 1
                                   end_column = 130
                                   start_line = 1
                                   end_line = 10 ).
    * Anzeige der Daten
            lr_alv->display( ).
            IF sy-subrc <> 0.
              MESSAGE i001(z_pm_tool).
            ENDIF.
          CATCH cx_salv_msg.
        ENDTRY.
      ENDMETHOD.                    "detail
    ENDCLASS."lcl_event_handler IMPLEMENTATION
    Edited by: polaris1 on Dec 15, 2010 12:18 PM

    Can't read that jumble, but suggest you look at the excellent SALV tutorials by Rich Heilman by searching for SALV tutorial on SCN.  You'll find working code and how-to for adding your own functions to SALV.

  • How do I create a journal using iPhoto 11 on a mac?

    Any idea how I can create an iphoto journal on my mac like I can do when using iphoto on my phone or ipad? I can't seem to make a Journal from my Mac using iPhoto 11.

    That is not a feature of iPhoto on the Mac  - it is only available on iPhoto for IOS - suggest to Apple - iPhoto Menu ==> provide iPhoto feedback.
    LN

  • How do you create a button to add a new form page to an existing form in Acrobat or Livecycle designer?

    Can someone tell me how to create a button to add a new form page to an existing form in Acrobat or Livecycle designer?

    In Acrobat forms you can use the 'template' object's 'spawn' metod. A Lesson in Templates for Adobe Acrobat by Dave Wrigtht

  • How to Best Create a DVD that will play on BOTH Mac and Windows

    Hello - Looking for some direction. How can I create an iDVD DVD that will play on both Mac & Win? I can not find a solution that will accomplish this. What I did was create an .img then burned to DVD. This plays fine on my Mac & on home stereo DVD but not on a windows machine. The Windows machine can "read" the DVD fine but WIndows Media Player can not play it. Do I need to have folks use a special player on WIndows? Is there another format the I should have iDVD output? I need to send some DVDs to college coaches for my son and am trying to do this the best way without knowing what platform (Mac or WIn) they will be using. What is the best approach?
    Thanks in advance for your help,
    David

    Hi
    There are two ways to burn a DVD.
    • as a Data-DVD (eg including a video.img file or any data)
    • as a Video-DVD
    A. Data DVD is what You creat by just popping in a DVD disk and OK to format it.
    B. Video-DVD - You make from within iDVD and insert thed DVD WHEN iDVD asks for it
    (OR - Via Disk Util tool - Still introduced when asked to do it !)
    (or via Roxio Toast™ - STILL not inserted until asked to do this)
    So what You've done is a Data-DVD with Your movie as an .img file on it.
    • Can only be playbacked on Your Mac
    Open "Disk Util tool"
    Then on Dasktop - Double click the .img file so that it creates a fake DVD disk
    Then in "Disk Util tool" - select it and click the Burn (Nuclear) button
    THEN insert a new DVD WHEN asked to do this.
    NOW ! ! Select a lower Burn Speed eg 4xDVD - This will result in a DVD with few burn errors and
    a PC will read it easier !
    Use of quality DVD brand is also important - I use Verbatim
    I use DVD-R
    Good Luck - Bengt W

  • How do I create a Toolbar like Windows Explorers allows you to set up

    I want to install Google toolbar as well as some others like Crawler Toolbar. Is there anyway of doing this in Safari

    HI and Welcome to Apple Discussions...
    Click Safari/Preferences. In the General tab, click the pop up menu where you see:
    Default search engine and select Google.
    If the Google search bar isn't visible, open the Safari Preferences window again and click:
    Customize Toolbar. Simply drag the Toolbar up to just the right side of the Address Bar.
    Carolyn

  • How do I create a desktop shortcut to an application in Mac OS 9?

    For example I have installed the original command and conquer (Blast from the past!) how do I get the application icon to the desktop as a 'shortcut'?

    You can also hold down both the Command and Option keys, and while keeping them held down drag the icon of the game out to the desktop. When you release the mouse, an alias (shortcut) to the game will be created where you let go.
    One advantage to this method is that the resulting alias will not have the word "alias" appended to it (unless you initially drop it in the same folder as the original).

Maybe you are looking for