Object Name Change in Expressions

Bugs will be moved here once resolved.

Post » Mon Aug 29, 2011 4:09 pm

Hey,

the Object Names dont Auto-Rename in Expressions.

B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Mon Aug 29, 2011 6:23 pm

I don't understand. Everything is named "Goodie" in that picture. What were you expecting to happen instead?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Mon Aug 29, 2011 7:24 pm

I think he is bothered by the lower case of the name.
B
23
S
4
G
7
Posts: 98
Reputation: 5,220

Post » Mon Aug 29, 2011 8:19 pm

In Construct Classic, expressions will stay in the case you type it, so if you enter GoOdIe, it will stay that way. I guess C2 has this as well...

Edit: Oops, looks like this has been changed, entering object names in expressions works properly for CC.Jayjay2011-08-29 20:26:25
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Mon Aug 29, 2011 8:24 pm

Yes, I intended that C2 leaves expressions how you typed them, and only changes it if the object name changes to a different string (not the same string differing only by case). Do you think I should change this?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Mon Aug 29, 2011 8:28 pm

[QUOTE=Ashley] Yes, I intended that C2 leaves expressions how you typed them, and only changes it if the object name changes to a different string (not the same string differing only by case). Do you think I should change this?[/QUOTE]

Since C2 allows searching of an event list then it'd probably be helpful. Then they can find different expressions depending on certain cases (eg: Player, PLayer, one is the player object, the other is the layer the player is spawned on).Jayjay2011-08-29 20:29:10
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Mon Aug 29, 2011 8:33 pm

Would that really be useful? It seems to me a case insensitive search is more useful so you don't have to worry about whether you typed "Player" or "player", and naming collisions like that shouldn't be too common. I would prefer to leave it as is.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Mon Aug 29, 2011 8:43 pm

Agreed about the case insensitive search.
Concerning the casing in expressions, at first I was a little surprised that expressions wouldn't change automaticly the case of variables or object names.
When eye-scanning the code, it is easier to pair objects and variables through lines if they all use the same casing (the one of their definition).

It's not a big deal though, as long as the expression works and pick the right object/var.

Jayjay your example probably works for seasoned developpers who take naturaly into account that Player is not PLayer. It is less user friendly though when you have to look for hours in your code trying to find out why there is an error and that the player object is affected instead of the layer.
"OH myyyyyyyyy I just made a typo and haven't seen it before."

This happens often ^^
Insensitive casing prevents that case.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests