Need widget to perform function when Dashboard is active

Discussion in 'Mac Programming' started by Avizzv92, Mar 5, 2009.

  1. macrumors regular

    Joined:
    Mar 23, 2008
    #1
    I want my widget when dashboard is opened by the user too run a function. Not just when the widget is loaded for the first time on startup. I'm using this document as a guideline...http://developer.apple.com/documentation/AppleApplications/Conceptual/Dashboard_ProgTopics/Articles/Events.html#//apple_ref/doc/uid/TP40003044-DontLinkElementID_35

    Here is a quick example of what I have that doesn't seem too run when dashboard is opened.
    Code:
    if (window.widget)
    {
    widget.onshow = onshow;
    }
    
    function onshow()
    {
    helloText.style.visibility = 'visible'
    }
    
    What would I be doing incorrectly?
     

Share This Page