Windows Sidebar Gadget: System Undefined

1 min read

I’ve developed a couple of gadgets and have found that, since installing the latest built of IE7 or Windows 7 the settings pages have broken.

From some initial testing it seems as something has changed in the Sidebar event model.

What happens is that when handling the onload event of a gadget’s settings page, System hasn’t been loaded yet (thus the System undefined error). So there is no way to properly initialize the settings page’s  html Controls using the System.Gadget.Settings object.

I’ve also tried using the System.Gadget.onShowSettings event from my gadgets main pages to initialize my settings pages’ html controls but the problem then is that the Settings Pages haven’t been loaded yet so there is no dom access to my html controls.

Has anyone else noticed this problem?

<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<title><title> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<link type="text/css" rel="stylesheet" href="css/luna/luna.css" /> 
<script type="text/javascript" language="javascript" src="js/Settings.js"><script> 
<head> 
<body onload="InitPage()" style="width: 500px; height: 500px; font-size:xx-small"> 

 

function InitPage() { 
    //<-- This causes System Undefined error 
    System.Gadget.Settings.Read("someSetting"); System.Gadget.onSettingsClosing = SettingsClosing; }

Discover more from ksharp

Subscribe to get the latest posts sent to your email.

myFacebook status feed update

It seems that Facebook has changed the friends status page and has removed the RSS feed link that existed there. So it’s a bit...
kpantos
45 sec read

Protected: New myFacebook gadget version

There is no excerpt because this is a protected post.
kpantos
1 min read

Greek gadget competition 2007

2013-05-17 23:13:59
kpantos
46 sec read

3 Replies to “Windows Sidebar Gadget: System Undefined”

  1. Yes, I”ve got exactly the same problem with one of my gadgets. The Flyouts when running in Windows 7/IE8 all fail with “System is undefined”.

  2. I found a solution to the problem using msdn forums.
    Just open your html pages (flyout or settings page in my case) using notepad and save them using unicode encoding, that solves the “System is undefined” problem.
    At least it did in my case…

  3. This thread”s a little old, but I just ran into this problem today. I revised my initialization code as follows:

    function init() {
    if (System){
    // initialization code
    } else {
    setTimeout(“init()”, 1000); // Try again in a second
    }
    }

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from ksharp

Subscribe now to keep reading and get access to the full archive.

Continue reading