Space Character trimmed from instance variable

Bugs will be moved here once resolved.

Post » Mon Apr 28, 2014 2:53 am

Problem Description
Sprite has an instance variable "char", type string/text.

If the variable is set to a equal a single "space" character (instead of an "a", "b" etc) then the process of saving and reloading will trim the character from the instance variable.

i.e., set it " " and save and reload will make it "" (no apostrophes of course)

Attach a Capx
https://www.dropbox.com/s/qz3k187e8hdv63s/SpaceBug.capx

Description of Capx
This bug came about when I was making my own virtual keyboard.

The spacebar was assigned a " ", i.e., single space character. This works fine until you save and reload and the space character has been removed.

Other keys are assigned other ascii characters.



Steps to Reproduce Bug
  • Step 1 The saved capx will not have the "space" char in place so you will need to edit the instance variable.
  • Step 2 If you run it the text on the right will indicate the space is found.
  • Step 3 Now save restore and rerun and the space is gone,

Observed Result
manually put in the space - all good

save and reload - no space - no good

Expected Result

Operating System and Service Pack
wndows 7

Construct 2 Version ID
168
B
37
S
9
G
5
Posts: 437
Reputation: 6,098

Post » Fri May 02, 2014 4:06 pm

So I've spent a while debugging this and it seems our XML parsing library is determined to remove the space from the file format.

I don't think I can fix it :P Hopefully it's easy to work around?
Scirra Founder
B
402
S
238
G
89
Posts: 24,632
Reputation: 196,031

Post » Sat May 03, 2014 4:25 am

Yes I will be able to set at runtime - less elegant.
B
37
S
9
G
5
Posts: 437
Reputation: 6,098


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest