ElDiabloConCaca
U.S.D.A. Prime
Cat said:As we now know, the widgets appear to be nothing but web-pages (with some extra's). I don't think it would be difficult to hack them to run outside of the Dashboard. First of all, what happens if you load them in Safari? Does it simply display them inside the browser window? What happens if you try to run the JavaScript with the Java AppletRunner? Can we build a simple app to run them on the Desktop? If they just need WebKit to run them, I think it will be relatively easy ... morover, what can Widgets do that we can't already do in AppleScript (I mean functionally, not aesthetically)?
Widgets are NOT web pages. They are widgets that use the same languages and structures that web pages use, with a little Cocoa thrown in, but they are most definitely not HTML pages -- they're actually XML, but they will not open in a browser.
They are extremely easy to write, though, if you've ever written a little JavaScript... for example, here's a little code from Arlo & Perry from their Calendar widget:
Code:
// Write the Days of the week
for (var i = 0; i < 7; i++) {
weeksShadow[i] = new Text();
weeksShadow[i].hOffset = (i * 30) + 37;
weeksShadow[i].vOffset = 34;
weeksShadow[i].size = 10;
weeksShadow[i].font = "Arial";
weeksShadow[i].alignment = "right";
weeksShadow[i].color = "#000000";
weeks[i] = new Text();
weeks[i].hOffset = (i * 30) + 36;
weeks[i].vOffset = 33;
weeks[i].size = 10;
weeks[i].font = "Arial";
weeks[i].alignment = "right";
weeks[i].color = "#ffffff";
See? Reguar JavaScript style programming... I think I might take a stab at one of my own soon!
Also, I highly doubt that Apple's Java AppletRunner will run a JavaScript. Just because they share four letters doesn't make them the same thing. In actuality, only the syntax between Java and JavaScript is similar (and still different)... in every other regard, though, they are completely different, incompatible beasts. Java is not JavaScript, and JavaScript is not Java.