Adding a wizard interface

Actually we do not have to define an additional <wizard> interface, but here is how that would be done. To add a wizard interface, you will add a <wizard> tag at the same level as the <dialog> tag:

		<wizard label="Two Variable t-Test">
			<page id="firstpage">
				<text>As a first step, select the two variables you want to compare against
					each other. And specify, which one you theorize to be greater. Select two-sided,
					if your theory does not tell you, which variable is greater.</text>
				<copy id="main_settings_row"/>
			</page>
	

Some of this is pretty self explanatory: We add a <wizard> tag with a label for the wizard. Since a wizard can hold several pages that are shown one after another, we next define the first <page>, and put an explanatory <text> note in there. Then we use a <copy> tag. What this does, is really it saves us having to define yet again, what we already wrote for the <dialog>: The copy tag looks for another tag with the same id earlier in the XML. This happens to be defined in the <dialog> section, and is a <row> in which there are the <varselector>, <varslots> and the hypothesis <radio> control. All of this is copied 1:1 and inserted right at the <copy> element.

Now to the second page:

			<page id="secondpage">
				<text>Below are some advanced options. It is generally safe not to assume the
					variables have equal variances. An appropriate correction will be applied then.
					Choosing "assume equal variances" may increase test-strength, however.</text>
				<copy id="varequal"/>
				<text>Sometimes it is helpful to get an estimate of the confidence interval of
					the difference in means. Below you can specify whether one should be shown, and
					which confidence-level should be applied (95% corresponds to a 5% level of
					significance).</text>
				<copy id="frame_conf_int"/>
			</page>
		</wizard>
	

Much of the same thing here. We add some texts, and in between that <copy> further sections from the dialog interface.

You may of course make the wizard interface look very different to the plain dialog, and not use the <copy> tag at all. Be sure, however, to assign corresponding elements the same id in both interfaces. This is not only used to transfer settings from the dialog interface to the wizard interface and back, when the user switches interfaces (which does not yet happen in the current version of RKWard), but also simplifies writing your code template (see below).