Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Code Help] AppleButton not working



I've compared my code to examples and still cannot figure out why the button is not appearing, either in Safari or in Dashboard.

Something you'll probably want to do when developing widgets is keep Console (in your Utilities folder) open. Most javascript errors (and alert()s!) are output to console.log, which is displayed in by the Console application.


I copied your files to disk, opened your HTML file in Safari, and saw the following in Console:

(event handler):Can't find variable: buttonClicked

Sure enough, when I looked at your code, I saw that your first glass button is defined as:

gIsabelButton = new AppleGlassButton(document.getElementById ("isabelButton"), "Click Me", buttonClicked);

and also that the "buttonClicked" funtion indicated as the last argument was not defined in any file.

When I added:

function buttonClicked(){
}

to your source, and reloaded Safari, the button appeared just fine.


Cheers! -Joshua Emmons _______________________________________________ Do not post admin requests to the list. They will be ignored. Dashboard-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/dashboard-dev/email@hidden

This email sent to email@hidden
References: 
 >[Code Help] AppleButton not working (From: Anthony <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.