Menu

#1078 Text Manipulator 'String is set', 'For each substring' bugs

open
nobody
None
5
2009-11-27
2009-11-27
AshyRaccoon
No

Construct 0.99.62

First bug:
The Text Manipulator 'String is set' condition is always reading as false, even if I have set the text manipulator's string just before it.

I have an event:
Start of layout -> TextManipulator: Set string to "This is the TextManipulator text"
Then a sub-event checking the text manipulator's 'String is set' condition. It's always saying it's not set, even though TextManipulator.GetString gives me its string in the same sub-event.

Second bug:
I can crash my application if I execute the following condition twice:
TextManipulator: For each substring, delimited by " " -> Text: Set text to TextManipulator.GetCurrentSubString
(It doesn't crash if I toggle off the 'Text: Set text to TextManipulator.GetCurrentSubString')

Also, the text doesn't appear to be set properly on the second click.. maybe, or it's just crashing before it gets a chance to go further in the textmanipulator's substrings.
The TextManipulator's text is: "This is the TextManipulator text"
but what I see appear on the text object is: "TextManipulator", then another click gives "is" just before it crashes.
-----
Try running the included cap file, and:
-When I start it, the text object displays "This is the TextManipulator text but 'String is set' was read as false", meaning 'String is set' wasn't detected as true yet it has successfully read TextManipulator.GetString.
-Try clicking the button labeled "Test substring read" twice, which does a 'For each substring, delimited by ""', and for each one sets the text object's text to TextManipulator.GetCurrentSubString. Again, it crashes the application.

Also, I am not sure 'For each substring, delimited by " "' works as I expect it to. It seems like in the string ""This is the TextManipulator text", the last word "text" never gets counted as it doesn't have a space after it.

Discussion

  • AshyRaccoon

    AshyRaccoon - 2009-11-27
     
  • AshyRaccoon

    AshyRaccoon - 2009-11-27

    I have worked around this by not using the Text Manipulator at all, instead using a system For loop on NumTokens("some string goes here"," ") and GetToken("some string goes here",global('i')," ")

     

Log in to post a comment.