PlayfulGuy wrote:
Philo,
I took the sample code you provided and wrapped it in a simple Guide for testing and it worked properly for userSettings. I then modified it so that the start page sets three guideSettings (a string, a number and a boolean) and modified your code to use guideSetting instead of userSetting.
guideSetting definitely does not work. the keyExists call always returns false. The jscript.log is in the spoiler below. This time I'm sure it's not just me.
If they are new preferences you need to use addPref not setPref
Key, Value, Text displayed in Guide Preferences
guideSettings.addPref("myGuideName", "This is my name", "Please enter the name you wish to be known by");
guideSettings.addPref("myGuideage", 27 "Please enter your age");
guideSettings.addPref("myGuidecbt", false, "Do you like cock and ball torture?");
However key exits is looking for the description not the key
So I will fix that.
PlayfulGuy wrote:
And one other question - is it possible to override the saved state and force a tease/guide to always start at the beginning? It often doesn't make sense to jump in to the middle of a tease.
Not at the moment but I will look at adding a node in the tease xml for when it is loaded.
I will also add something accessible from java script, as it may be useful to force a restart part way through a tease, e.g. if they fail they have to restart from the beginning.