Get property_list value at edittime

Post your work in progress addons and get feedback

Post » Wed Jan 14, 2015 11:03 pm

I'm trying to find out if a user is typing in for example, the wrong number in the property list... and if they do, alert them of the wrong thing.... problem is, I don't see anything in the array that will allow me to pull the current value. Is there a way?

All I see: [type,name,initial_value,description,param]

Is there a way? I even tried a number of things in the "OnPropertyChanged" function... but there's nothing in there either.

Thanks!
B
47
S
15
G
3
Posts: 201
Reputation: 4,625

Post » Sat Jan 17, 2015 5:25 am

Is it that no one knows, or no one wants to share? Or those who do know, haven't seen this yet? :)
B
47
S
15
G
3
Posts: 201
Reputation: 4,625

Post » Tue Jan 20, 2015 1:26 pm

Hi,

an example :

Code: Select all
var property_list = [
      new cr.Property(ept_integer,   "age",   17,   "age"),
];


Code: Select all
IDEInstance.prototype.OnPropertyChanged = function(property_name)
{
   if (property_name === "age")
   {
      if (this.properties["age"] < 18)
      {
         alert(this.properties["age"]);   
      }
   }
}
B
18
S
3
G
5
Posts: 8
Reputation: 3,754

Post » Tue Jan 20, 2015 7:17 pm

Amazing... thank's so much Aura.... worked like a charm!
B
47
S
15
G
3
Posts: 201
Reputation: 4,625


Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 1 guest