GetText is not a public member of TextBox SOLVED

Started by cinos, Mon 02/10/2006 12:46:46

Previous topic - Next topic

cinos

I am trying to use the information a user has placed in a text box. I looked at the ags manual and it indicated thatÃ,  Ã,  Ã, UserInput.GetText(input); was the command I should use. When I run the script an error message says 'GetText' is not a public member of 'TextBox' ????????????

SSH

Make sure that the manual and the version of AGS you are using match. Try

Code: ags

String input=UserInput.Text;

12

cinos

#2
Tried the code. Get error Undefined symbol 'User' ??? I am using ags version 2.72.652.0 and the manual is 2.7.

SSH

Why are you using the 2.7 manual? Just press F1 in your AGS editor to get the latest one! Craaazy!

I assumed that UserInput was the script name of the textbox that put in your GUI. Go to  the GUI editor, find your text box and give it a script name (top box of the little properties window). Now, go back to your script and replace "UserInput" with the name of your textbox.

12

cinos

#4
Yep done this and still get the message GetText is not a public member. I have used the f1 key and the contents show but I get a page cannot be displayed when I click on a topic. Here is the code//txtUserInput is the script name of the text box.

txtUserInput.GetText(string buffer);
String input;
txtUserInput.GetText(input);

Ashen

#5
As SSH said, you should be using .Text not .GetText() - just use the code he gave, but replace UserInput with txtUserInput.

As for the manual not showing properly, try this link - it's a known issue, but hopefully the advice in that thread will resolve it.
I know what you're thinking ... Don't think that.

SSH

Beat me to it, Ashen. I've added that thread to the BFAQ on the wiki.
12

cinos

#7
Quote from: Ashen on Mon 02/10/2006 14:07:29
As SSH said, you should be using .Text not .GetText() - just use the code he gave, but replace UserInput with txtUserInput.

As for the manual not showing properly, try this link - it's a known issue, but hopefully the advice in that thread will resolve it.
Thanks for the help SSh and Ashen. The piece of code now works! If you look at my other post you will see that I have an issue so I am trying to work out how to make  an if else statement with the results from the text box using Text.AsInt.

EDIT:
Now the manual is working. Just love learning stuff on line. Now back to the script.

SMF spam blocked by CleanTalk