Copy out of Dashboard Calculator

Discussion in 'macOS' started by eharley, Feb 17, 2009.

  1. eharley macrumors newbie

    Joined:
    Dec 27, 2007
    #1
    I finally go around to upgrading to 10.5 from 10.4

    One thing that struck me was that I could no longer copy to the clipboard the result of the computation in the Dashboard's calculator widget. Something I could do under 10.4

    I can paste into it. I can copy/paste/cut in the Stickies application. But I can't copy out of the Calculator.

    I opened up the .html and .js files for the widget and yes there is a handler for the copy event but its not getting invoked.

    Can anyone verify this behavior on their computers? Perhaps there is something wrong with mine.
     
  2. nando2323 macrumors 6502a

    Joined:
    Aug 15, 2007
  3. pwn247 macrumors 6502

    pwn247

    Joined:
    Aug 30, 2008
    Location:
    West Virginia, USA
    #3
    One thing that you can do is open Spotlight, type your equation (like 2+5), and it will give you the answer. I'm not on my Mac right now so I'm not sure as to if you can copy/paste in or out of Spotlight.
     
  4. rdowns macrumors Penryn

    rdowns

    Joined:
    Jul 11, 2003
    #4
    You can copy results from Calculator.app, FWIW.
     
  5. eharley thread starter macrumors newbie

    Joined:
    Dec 27, 2007
    #5
    So I found a fix. It looks like the oncopy handler is broken. So I opened up Calculator.html and added a handler for onbeforecopy which calls the same function, docopy().

    Here's the new body tag

    Code:
    <body onbeforecopy='docopy(event);' oncut='docut(event);' oncopy='docopy(event);' onpaste='dopaste(event);'>
     
  6. lunar macrumors newbie

    Joined:
    Feb 2, 2008
    #6
    Awesome! eharley, thanks for posting this fix. It worked wonderfully.

    If anyone is wondering, widget HTML is stored in HD>Library>Widgets and then you'll have to right click and "show package contents" on the widget you want to edit.
     

Share This Page