Microsoft KB Archive/927825

= You receive an error message when you use a Windows Vista Sidebar gadget that has an event that is set to null =

Article ID: 927825

Article Last Modified on 5/16/2007

-

APPLIES TO


 * Windows Vista Ultimate
 * Windows Vista Enterprise
 * Windows Vista Business
 * Windows Vista Home Premium
 * Windows Vista Home Basic
 * Windows Vista Ultimate 64-bit Edition
 * Windows Vista Enterprise 64-bit Edition
 * Windows Vista Business 64-bit Edition
 * Windows Vista Home Premium 64-bit Edition
 * Windows Vista Home Basic 64-bit Edition

-



SYMPTOMS
When you use a Windows Vista Sidebar gadget, you receive an error message that resembles the following:

A Runtime Error has occurred. Do you wish to Debug? Line: Error: Unspecified error

.



CAUSE
This problem occurs if the gadget's script code tries to set a gadget event to null. Sidebar gadget events cannot be set to null.



WORKAROUND
To work around this problem, assign a function to the Sidebar gadget event.



Steps to reproduce the problem
 Open the gadget's .html file. Type the following code inside a tag:

System.Gadget.ondock = myFunc; System.Gadget.ondock = null;



For more information about Sidebar gadgets, visit the following Microsoft Web site:

http://msdn2.microsoft.com/en-us/library/ms723694.aspx

Keywords: kbexpertiseinter kbtshoot kbscript kberrmsg kbprb KB927825

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.