Tab delimiter

Discussion and feedback on Construct 2

Post » Thu Mar 08, 2012 7:38 pm

Would it be possible to add support for special characters other than just newline? Particularly, it would be really nice to be able to use the tab character as a delimiter in tokenat and tokencount. I tried '\t' but it didn't work.

Thanks,
-- cacotigon
B
30
S
6
G
8
Posts: 232
Reputation: 6,119

Post » Thu Mar 08, 2012 8:52 pm

A way to use the tab in Construct that I've used in CC is to open notepad type a tab, select it, copy it (Ctrl+C), then paste it in Construct with Ctrl+V.
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Fri Mar 09, 2012 5:55 am

That's a great workaround! Seems to work just fine, much appreciated!
B
30
S
6
G
8
Posts: 232
Reputation: 6,119

Post » Fri Mar 09, 2012 4:37 pm

Nuts, well, it works in all cases, however, if you put it in a global variable by itself as soon as you save project/exit and reload it, the program sets the value to an empty string.

However, it seems to remain if used anywhere else, for example, if you had an action that stated: "s" + "<tab>" + "h"
then it would remain between save/loads.

@Ashley: Do you think scirra could add a quick change such that global variables would support using a tab. The reason that i mention this is that I have a global variable called COL_DELIMITER, which is currently a tab, but may change at a later time. Thus, I would rather avoid hardcoding the delimiter string(tab, newline, character, etc) in the dozens of tokenat/tokencount statements in the code.

Thanks,
-- cacotigon
B
30
S
6
G
8
Posts: 232
Reputation: 6,119


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests