Runtime.js properties issue

Bugs will be moved here once resolved.

Post » Wed Dec 21, 2011 6:16 pm

in edittime.js, when you set properties, you can't set two properties or more with the same name....

new cr.Property(ept_integer, "Size", "40", "Size A"),
new cr.Property(ept_integer, "Size", "1", "Size B")

the first is called in the runtime by this.properties[0], the second by this.properties[1], but in Construct 2 (as in preview/exported project), the 2nd propertie is exactly the same that the 1st one(the initial value of the 2nd properties will be "40" instead of "1", as its description will be "Size B")

I need same name, because my properties works as category.
e.g there is a size used by one function, another by another function...

septeven2011-12-21 18:19:09
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Wed Dec 21, 2011 8:45 pm

This is by design, and cannot be fixed - the property grid itself distinguishes properties by their name, including the OnPropertyChanged function which is passed the name of the property. You just need to use different names.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Dec 21, 2011 9:31 pm

:/ without category as parameters for proprieties, that is really not practical for plugins which requires several proprieties....
B
44
S
12
G
13
Posts: 628
Reputation: 10,471


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests