Text object pv's

For questions about using Classic.

Post » Sun Sep 06, 2009 10:51 pm

Um yeah something seems to be wrong with 99.5 text object pv's.
Anybody care to confirm?
Image Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273

Post » Sun Sep 06, 2009 11:25 pm

What exactly is wrong?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Mon Sep 07, 2009 3:19 am

Add a pv to a text object, var here
add mouse/ keyboard
then event as simple as this:

MouseKeyboard: 15 On Left mouse button Clicked
> TextSet text to Text 0 .Value("Var")
> TextAdd 1 to 'var'

The text just disappears as soon as you click.
Image Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273

Post » Mon Sep 07, 2009 6:56 am

EDIT: Okay, I see what the issue is. You have Text.Value("Var") with double quotes, not Text.Value('Var') with single quotes.

My original post, anyways:

Try:
str(Text.Value('var'))

or:
"" & Text.Value('var')

But curiously enough, even without doing that, I am seeing the text display okay. I'm using 0.99.5 here.
Copying/pasting my event as text:
MouseKeyboard: 14 On Left mouse button Clicked
> TextSet text to Text 0 .Value('var')
> TextAdd 1 to 'var'
B
3
S
1
G
3
Posts: 82
Reputation: 1,189

Post » Mon Sep 07, 2009 2:49 pm

Yes singles work fine, and I see when you click on the add pv command it doesn't have the quotes included.
Image Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests