Mailing Lists: Apple Mailing Lists

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

[Code Help] AppleButton not working



Hello, I've recently taken on my first dashboard project and seem to be having an enormous amount of trouble. I've read all the documentation and tutorials and such, but still cannot get the AppleButton to work properly. I've compared my code to examples and still cannot figure out why the button is not appearing, either in Safari or in Dashboard. I've attached the code if anyone is interested in taking a look. It's very basic, there is nothing but a few non-working buttons in the code right now. Any help would be greatly appreciated, thank you.


_________

Anthony S.

(Anto)



Attachment: isabel.css
Description: Binary data

var gIsabelButton;
var gDoneButton;
var gInfoButton;

function setup() {
	gIsabelButton = new AppleGlassButton(document.getElementById("isabelButton"), "Click Me", buttonClicked);
	gDoneButton = new AppleGlassButton(document.getElementById("doneButton"), "Done", hidePrefs);
	gInfoButton = new AppleInfoButton(document.getElementById("infoButton"), document.getElementById("front"), "black", "black", showPrefs);
}

function showPrefs()
{
	var front = document.getElementById("front");
	var back = document.getElementById("back");
	
	if (window.widget)
		widget.prepareForTransition("ToBack");		// freezes the widget so that you can change it without the user noticing
	
	front.style.display="none";		// hide the front
	back.style.display="block";		// show the back
	
	if (window.widget)
		setTimeout ('widget.performTransition();', 0);		// and flip the widget over	
	
}

function hidePrefs()
{
	var front = document.getElementById("front");
	var back = document.getElementById("back");
	
	if (window.widget)
		widget.prepareForTransition("ToFront");		// freezes the widget and prepares it for the flip back to the front
	
	back.style.display="none";			// hide the back
	front.style.display="block";		// show the front
	
	if (window.widget)
		setTimeout ('widget.performTransition();', 0);		// and flip the widget back to the front
}

//document.getElementById("front").style.display = "block";
//document.getElementById("back").style.display = "none";
//wIsabelButton.setEnabled(true);

 _______________________________________________
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



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.