PDA

View Full Version : String Variables



RecTech
12-19-2001, 04:32 PM
I completely understand numeric variables but string variables I don't seem to be grasping in Demoshield. Basically I need someone to give me a short tutorial on how to use them. Like, if some enters text into a text box, how do I save that text into a variable instead of refrencing the text box itself to get the data? Please let me know, thanx.

KimberlyH
12-19-2001, 05:07 PM
String Variables in DemoShield work the same as numeric variables but allow you to use alphanumeric characters and the data is read from left to right. Therefore, if you compare the following values: 1234 and 11223 The 1234 will be consider higher because the characters are being compared in order, not by total value. Basically string variables are used to hold string values such as registry keys, passwords, or text entered into an Edit Field.

Transferring data from an Edit Field Object to a Variable Object or Global Variable is only available in DemoShield 7.0x. Therefore, if you are working in a version prior to 7.01, you will not be able to do this.

To transfer data from an Edit Field Object to a Variable Object or Global Variable you can use the Perform Calculation action. The following instructions will walk you through setting this up.

First, create an Edit Field Object in your scene.
Next, create either a Variable Object or use one of the Global Variables under the Demo Properties.
Create a Bitmap Button Object in the scene and open the properties.
Navigate to the Actions tab.
Click New.
Select Perform Calculation from the action drop down list.
Click Next.
For the action settings assign the following:

Result
Scene Name: Scene you are currently working on
Object Name: either the Variable Object or the Global Variable

Operator: Assign Value

1st Operand
Type: Object
Scene Name: Scene you are currently working on
Object Name: Edit Field Object

What this will do is, when the Bitmap Button is clicked, the data from the Edit Field will be entered into the Variable Object or Global Variable.

I hope this helps.