]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scripting/nasal-props.cxx
rename attributes write/read to writable/readable (The original names
[flightgear.git] / src / Scripting / nasal-props.cxx
index c76762bfd62003c7ed08276dd570af4af6bfa5ad..6e61900474a33c7e4b994e56e09ccf989fb70f2e 100644 (file)
@@ -84,11 +84,11 @@ static naRef f_getAttribute(naContext c, naRef me, int argc, naRef* args)
     if(!a) a = "";
     if(!strcmp(a, "children"))         return naNum((*node)->nChildren());
     else if(!strcmp(a, "listeners"))   return naNum((*node)->nListeners());
-    else if(!strcmp(a, "refcount"))    return naNum(node->getNumRefs());
+    else if(!strcmp(a, "references"))  return naNum(node->getNumRefs());
     else if(!strcmp(a, "tied"))        return naNum((*node)->isTied());
     else if(!strcmp(a, "alias"))       return naNum((*node)->isAlias());
-    else if(!strcmp(a, "read"))        attr = SGPropertyNode::READ;
-    else if(!strcmp(a, "write"))       attr = SGPropertyNode::WRITE;
+    else if(!strcmp(a, "readable"))    attr = SGPropertyNode::READ;
+    else if(!strcmp(a, "writable"))    attr = SGPropertyNode::WRITE;
     else if(!strcmp(a, "archive"))     attr = SGPropertyNode::ARCHIVE;
     else if(!strcmp(a, "trace-read"))  attr = SGPropertyNode::TRACE_READ;
     else if(!strcmp(a, "trace-write")) attr = SGPropertyNode::TRACE_WRITE;
@@ -112,8 +112,8 @@ static naRef f_setAttribute(naContext c, naRef me, int argc, naRef* args)
     SGPropertyNode::Attribute attr;
     char *a = naStr_data(val);
     if(!a) a = "";
-    if(!strcmp(a, "read"))             attr = SGPropertyNode::READ;
-    else if(!strcmp(a, "write"))       attr = SGPropertyNode::WRITE;
+    if(!strcmp(a, "readable"))         attr = SGPropertyNode::READ;
+    else if(!strcmp(a, "writable"))    attr = SGPropertyNode::WRITE;
     else if(!strcmp(a, "archive"))     attr = SGPropertyNode::ARCHIVE;
     else if(!strcmp(a, "trace-read"))  attr = SGPropertyNode::TRACE_READ;
     else if(!strcmp(a, "trace-write")) attr = SGPropertyNode::TRACE_WRITE;