Hey all,
I have been messing around in Dashcode recently, and came across something I wanted to do, but couldn't figure out how...
I want to add a little bit of HTML Code on the back of the Widget - and I'm wondering how I could accomplish this - Thanks...
Edit: I also wanted a way to "Check for an Update". I have added a button that displays a web page saying Version x is the most recent version, but wondered if there was a way in the Widget to say "You have the most recent version"... is that possible, thanks.
I might be wrong about this seeing as how I've only kinda explored dashcode, but I don't think its possible to add your own HTML.
As for your other question, I take it you want to keep it online?I'm just making this assumption since you want to use HTML.
Well, in any case, making a web app wouldn't require version checking, since every time the user loaded it up, the most recent version with any new changes would pop up.
If thats not the case, then one way to do it would be to do it like this(this is using javascript since I believe thats all DashCode can handle)
Set up a variable with the value being the current version
Example:
var currentVersion = 1.0;
as you release updates, make sure to change the value of the variable.
In the program you would make a function that checks for updates. This could run every time the program connects to the internet. It should pass the value of the version that the current user has, so lets say that the user currently has the ".05" version of your program.
For him/her, the variable currentVersion would read ".05".
So you will need to pass that value into your function. Before that though, it might be useful to make another variable with that ".05" value just so things dont' get confusing. Lets say we assigned that value into a variable called
"userVersion".
so:
var userVersion = .05;
Next we call the function:
updateCheck(userVersion);
function updateCheck(userVersion){
if(currentVersion>userVersion){
alert("There is a new version available. Please download here");
}else if(currentVersion==userVersion){
alert("you have the most recent version");
}
This is just the basic principle behind version checking, I'm not sure if widgets can handle alert functions or not, and like I said, I've only kinda explored Dashcode, so I'm not sure how the workflow is structured, but this should give you enough of an idea on how to do version checking.