Professional Web Applications Themes

DockAdd/RemoveItem(...) ? - Mac Programming

Before I jump into my next award winning shareware... I've been all over the "Dock Manager" API-- it seems to concern itself exclusively with mucking around with the icon, the little menu, the stinkin' badges, but nowhere like nowhere do I see anything about programmatically adding/removing items from the dock. Sanity check: it's just not there, right? Eden...

  1. #1

    Default DockAdd/RemoveItem(...) ?


    Before I jump into my next award winning shareware...

    I've been all over the "Dock Manager" API-- it seems to concern itself exclusively with mucking around with the icon, the little menu, the stinkin' badges, but nowhere like nowhere do I see anything about programmatically adding/removing items from the dock.

    Sanity check: it's just not there, right?

    Eden
    zeppenwolf Guest

  2. #2

    Default Re: DockAdd/RemoveItem(...) ?

    In article <lafn.org>, zeppenwolf <pg>
    wrote:
     

    It's rude. Don't do it. Please.

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  3. #3

    Default Re: DockAdd/RemoveItem(...) ?

    "Miro Jurisic" <org> wrote in message
    news:mit.edu... 
    <pg> [/ref]
    itself 
    >
    > It's rude. Don't do it. Please.
    >[/ref]

    It doesn't have to be. I would consider an option on install to add the icon
    to the dock useful, just as for (dare I say it)....Windows.

    Tom.


    Tom Guest

  4. #4

    Default Re: DockAdd/RemoveItem(...) ?

    On Thu, 24 Jun 2004, Tom Beer wrote:
     
    > <pg> [/ref]
    > itself 
    >>
    >> It's rude. Don't do it. Please.
    >>[/ref]
    >
    > It doesn't have to be. I would consider an option on install to add the icon
    > to the dock useful, just as for (dare I say it)....Windows.[/ref]

    Except that 99% of the time, installers are also rude. This isn't Windows;
    normal applications should not have installers. Of the remaining 1% of
    applications that do need installers, almost none of them should be
    putting anything in the Dock. (And I have written apps that need
    installers, I realize that it does happen sometimes.)
    Michael Guest

  5. #5

    Default Re: DockAdd/RemoveItem(...) ?

    > I would consider an option on install to add the icon to the dock useful, 

    We can argue about this back and forth, as it comes down to a matter of opinion,
    but, for the record, my opinion is that the best installer is one that asks as
    few questions as possible (none if at all possible). As a result, I think that
    asking this question at install time is misguided.

    You could convince me otherwise if you give me a good reason to believe that
    there is a significant fraction of Mac OS X user population that doesn't know
    how to add an item to the Dock (but would want to), because those are the only
    people who would significantly benefit from such a question at install time.
    (For all others, it's a minor convenience which, in my opinion, detracts from a
    clean installer experience for majority of the user population.)

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  6. #6

    Default Re: DockAdd/RemoveItem(...) ?

    In article <lafn.org>,
    zeppenwolf <pg> wrote:
     


    There's no API for it, no. But I did see some example source on
    developer.apple.com that showed how to create an entry suitable for
    injecting into the dock's .plist file. Its not real easy, but if you're
    still interested, I think it was called CFDockItems.

    Notice that even once you've put your app tile into the dock's plist,
    the dock doesn't automatically show it until it rereads its preference
    file.

    --
    |\/| /| |2 |<
    mehaase(at)sas(dot)upenn(dot)edu
    Mark Guest

  7. #7

    Default Re: DockAdd/RemoveItem(...) ?

    Miro Jurisic spake:
    ? In article <lafn.org>, zeppenwolf <mail
    ? home.pg> wrote:
    ?
    ?> but nowhere like nowhere do I see
    ?> anything about programmatically adding/removing items from the
    ?> dock.
    ?
    ? It's rude. Don't do it. Please.

    I see the thread going down an 'installer' branch. I can't quite be
    sure whether you & those posters are inferring that I wish to add an
    item as part of an install, or if they are just spinning their own cloth.
    For the record, I will describe why I want this: I consider the file/
    folder/app navigation in X to leave alot to be desired. Really.

    So I want to write a little thing to load up the "Favorites" folder (
    and maybe Dock, if can-do) to reflect what I want from the machine at a
    given moment.

    When I am working on LearnThisGodawfulObjC.pbproj, I want the Dock
    loaded up with Project Builder, I Builder, Alpha text editor, etc, and I
    want Favorites loaded up with folders of various source code hierarchies.

    When I am playing guitar, I want the Dock loaded up with Midi
    playing programs, AIFF editing programs, and Favorites loaded up with
    midi score hierarchies, etc.

    That seems reasonable, no? All specifics of the current case aside,
    if a shareware app with publicly advertised behaviour Z is downloaded
    and appreciated by Joe User, then by definition Joe User does not
    consider behaviour Z to be "rude", no matter what the HI guidelines say.
    Right?

    I agree that an installer which adds an item to the dock (without
    asking, anyhow) would be rude; hope it's clear now that's not my intent.

    Eden













    Eden Guest

  8. #8

    Default Re: DockAdd/RemoveItem(...) ?

    In article <cbdobh$7mn$connect.com.au>,
    "Tom Beer" <spamfilter.com> wrote:
     

    I do not see how such a question would be useful to anybody:

    - users that do not want the dock icon are annoyed to have to read
    and answer the question (this will take time, even if the default
    is 'no, I do not want an icon in the dock')

    - users that do want the dock icon probably still have to drag the
    icon to wherever they want it to show in the dock (in Windows, things
    are much worse, because one first must find the icon)

    To me, the other option of not asking it seems better for everybody:

    - users that do not want the dock icon are happy
    - users that do want the dock icon can easily drag it wherever they
    want it

    And that is the case where there is an installer, to start with. That in
    itself is a bad idea for most programs.

    Reinder
    Reinder Guest

  9. #9

    Default Re: DockAdd/RemoveItem(...) ?

    In article <lafn.org>,
    Eden Smallwood <pg> wrote:
     

    There are already craploads of utilities to do that; why develop a "yet
    another"? Just go to MacUpdate and search for "multiple dock". If what
    you do as a developer or a musician is different enough from what you do
    normally, maybe you should even use fast user switching to add accounts
    to serve roles.
    Doc Guest

  10. #10

    Default Re: DockAdd/RemoveItem(...) ?

    In article <lafn.org>,
    Eden Smallwood <pg> wrote:
     

    There are lots of programs which do this already, some free.

    www.versiontracker.com

    --
    |\/| /| |2 |<
    mehaase(at)sas(dot)upenn(dot)edu
    Mark Guest

  11. #11

    Default Re: DockAdd/RemoveItem(...) ?

    In article <lafn.org>,
    Eden Smallwood <pg> wrote:
     

    Fair enough. There are already 3rd party apps that do this. I highly recommend
    DragThing. If you are set on doing it yourself, check out
    <http://developer.apple.com/samplecode/CFPrefDockItems/CFPrefDockItems.html>

    hth

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139