Adding and removing application to the dock programmatically.

  • Hi All
    I have been having a bit of a problem with placing an application in the
    Dock. I want to place an application icon in the Dock programically. Is
    there some API call which can do this. I Already know another way to do
    the same which is by adding the application to
    "com.apple.preferences.plist" using "defaults". However the problem with
    this way is that the dock has to be restarted to show the change.
    This option i have want to provide to the user when he is installing my
    application.
    I have seen this kind of functionality in the Microsoft office set wizard.
    But they are using some "Setup Assistance" software for installing office
    not the apple standard installer (package maker as it does not have any
    such option of putting the application on Dock).
    Help will be appreciated.
    Thanks in advance.
    @mit jain

    =====-----=====-----=====
    Notice: The information contained in this e-mail
    message and/or attachments to it may contain
    confidential or privileged information. If you are
    not the intended recipient, any dissemination, use,
    review, distribution, printing or copying of the
    information contained in this e-mail message
    and/or attachments to it are strictly prohibited. If
    you have received this communication in error,
    please notify us by reply e-mail or telephone and
    immediately and permanently delete the message
    and any attachments. Thank you
  • On 22 Nov 2007, at 09:04, Amit8 J wrote:

    > I have been having a bit of a problem with placing an application in
    > the
    > Dock. I want to place an application icon in the Dock programically.

    [snip]

    > I have seen this kind of functionality in the Microsoft office set
    > wizard.

    Why not just let the user put the icon in the Dock himself if he wants?

    Don't assume that because you saw Microsoft do something, it must be a
    good idea.  Most applications shouldn't even have an installer, let
    alone a checkbox to programmatically modify the user's Dock.

    Kind regards,

    Alastair.

    --
    http://alastairs-place.net
  • On Nov 22, 2007, at 4:04 AM, Amit8 J wrote:

    > Hi All
    > I have been having a bit of a problem with placing an application in
    > the
    > Dock. I want to place an application icon in the Dock programically.
    > Is
    > there some API call which can do this.

    No, there is no API to do this.

    from what I've seen of other installers that do this (and it's
    probably a bad idea to add stuff to the dock anyways) they restart the
    dock anyways.
  • On Nov 22, 2007 1:04 AM, Amit8 J <amit8.j...> wrote:
    > Hi All
    > I have been having a bit of a problem with placing an application in the
    > Dock. I want to place an application icon in the Dock programically. Is
    > there some API call which can do this. I Already know another way to do
    > the same which is by adding the application to
    > "com.apple.preferences.plist" using "defaults". However the problem with
    > this way is that the dock has to be restarted to show the change.

    This is the only way that I know of to do this, and it is a horrible
    idea, for several reasons:
    1) It is not supported by Apple, and could change with any OS update
    2) Killing the user's Dock also kills all of the things that the dock
    is responsible for (such as Dashboard widgets).
    3) If I want something in my Dock, I'll put it there; nobody else should do so.

    > =====-----=====-----=====
    > Notice: The information contained in this e-mail
    > message and/or attachments to it may contain
    > confidential or privileged information. If you are
    > not the intended recipient, any dissemination, use,
    > review, distribution, printing or copying of the
    > information contained in this e-mail message
    > and/or attachments to it are strictly prohibited. If
    > you have received this communication in error,
    > please notify us by reply e-mail or telephone and
    > immediately and permanently delete the message
    > and any attachments. Thank you

    P.S. Is this disclaimer really necessary? Taking it literally, I'm not
    allowed to even read your e-mail, as I was not the "intended
    recipient", and I am committing a crime by the "use, review, ... or
    copying of the information contained in this e-mail message"

    --
    Clark S. Cox III
    <clarkcox3...>
  • On Nov 22, 2007, at 7:33 AM, Clark Cox wrote:

    > On Nov 22, 2007 1:04 AM, Amit8 J <amit8.j...> wrote:
    >> Hi All
    >> I have been having a bit of a problem with placing an application
    >> in the
    >> Dock. I want to place an application icon in the Dock
    >> programically. Is
    >> there some API call which can do this. I Already know another way
    >> to do
    >> the same which is by adding the application to
    >> "com.apple.preferences.plist" using "defaults". However the
    >> problem with
    >> this way is that the dock has to be restarted to show the change.
    >
    > This is the only way that I know of to do this, and it is a horrible
    > idea, for several reasons:
    > 1) It is not supported by Apple, and could change with any OS update
    > 2) Killing the user's Dock also kills all of the things that the dock
    > is responsible for (such as Dashboard widgets).
    > 3) If I want something in my Dock, I'll put it there; nobody else
    > should do so.

    Tell this to Apple. The installation of iWork '08 and iLife '08 do
    this and its very annoying.
    Russ
previous month november 2007 next month
MTWTFSS
      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    
Go to today