|
z-Tree: Tips & Tricks |
|
Licencing Installation First Steps Programming Layout Running a session Printing Other Tips Future improvements |
Layout
Leave Profit Display StandingYou can show on the waiting screen the same information as you show on the active screen. In this way, the subjects can continue to study the display when they have presed the continue button. In the waiting screen, you have to remove the "continue" button. By setting the name of the "continue"-button to "_" (without the quotes), the layout of the screen will be the same as the layout with the "continue" button but the button will not be displayed. Display Costs TableIf you wish to show the subjects a table with values, put the labels into a user defined table and you use a contract grid box to diplay the values. Own Records at the Top of a ListIf you want to place the own records of a subject at the top of a list, you can insert an expression into the sorting field of the contract list box. Suppose you want to start with the records where you are the seller. In these records, the variable Seller has the value of your variable Subject. This can be expressed with the following expression: if( Seller == :Subject , 0, 1) How can I check whether a field is empty or not? If I try to make a check as follows: a_geb=="" // a_geb is the name of the variable, I get a "Syntax error".You have to set the value of the variable to an illegal value. Since in z-Tree, only numbers are allowed as variables, this must be a number. Assume that the subjects have to enter a number between 0 and 23. In this case, you can use (for instance) -1 for empty. After the entry has been made, you can check if the variable still has the value -1. This procedure does of course not work if your item is defined in a contract creation box. In this case, the variable cannot be set to an illegal value because the record containing the variable will only be constructed when you click at the button. In this case, you have to enter the "illegal value" into the field "Default" in the item dialog. Why do the message boxes for range checks always appear in German ?The range checks are built into z-Leaf. They are available in many languages. For my convenience, the default is German. To start z-Leaf in English you create (in Windows) a shortcut to zleaf.exe. You open the properties of the shortcut and change the "target" in the tab shortcut to zleaf.exe /language english. Then, instead of starting zleaf directly, you start this shortcut and all texts will appear in English.
|