VAR type string / numeric display change

Issue #205 resolved
Turgut Guneysu created an issue

Script in blocks:

Script in text:

module main
author unknown
version 1 0
description ''
variables varString

         spec ' ' 'testBlock' 'testBlock'

to testBlock {
  varString = '0'
  sayIt varString 'is a String:' (isType varString 'string')
}

script 50 50 {
whenStarted
testBlock
waitMillis 3000
varString = ''
sayIt varString 'is a String:' (isType varString 'string')
waitMillis 3000
varString = 0
sayIt varString 'is a String:' (isType varString 'string')
waitMillis 3000
}
 script 52 283 {
to testBlock {}
}

I save the script and then reload:

While the type stays the same internally, the display shows a numeric field.

This also happens if I set a field to STRING ONLY in the script, save and then reload. It flips to numeric version display.

Try it with the “set varString to 0” 3rd block from the bottom of the main script.

Make it STRING ONLY. Save and reload. It displays numeric.

Maybe that is the way it is supposed to be, but it is confusing ! And kept making me change the field type to STRING ONLY repetitively, thinking I am making a permanent change.

Here is a, what I think is related, occurrence:

Attempt to duplicate the condition of the IF:

 And the duplicated block result:

Same thing happens if the ENTIRE IF BLOCK is duplicated.

That’s all I tested. There might be related similar occurrences with other blocks.

Comments (1)

  1. Log in to comment