Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
187
rated 0 times [  192] [ 5]  / answers: 1 / hits: 26911  / 13 Years ago, thu, may 19, 2011, 12:00:00

I need to declare a lot of object properties in my script and I wonder if the're any way to shorten this:



Core.registry.taskItemSelected;
Core.registry.taskItemSelected.id;
Core.registry.taskItemSelected.name;
Core.registry.taskItemSelected.parent;
Core.registry.taskItemSelected.summary;
Core.registry.taskItemSelected.description;

More From » object

 Answers
28

Wouldn't that work?



Core.registry.taskItemSelected = {
id: null,
name: null,
parent: null,
...
};

[#92158] Tuesday, May 17, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kaylinshayd

Total Points: 443
Total Questions: 104
Total Answers: 111

Location: Nauru
Member since Wed, Mar 29, 2023
1 Year ago
;