Changeset 127 for cpp/frams/vm/classes


Ignore:
Timestamp:
02/10/14 20:13:23 (11 years ago)
Author:
sz
Message:

bug fixed: all param items having GETONLY accessor must also have PARAM_READONLY flag

Location:
cpp/frams/vm/classes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/vm/classes/3dobject.cpp

    r121 r127  
    225225{"zz",1,PARAM_NOSTATIC,"orientation.z.z","f",FIELD(o.z.z),},
    226226
    227 {"x",0,PARAM_NOSTATIC,"x vector","oXYZ",GETONLY(x),},
    228 {"y",0,PARAM_NOSTATIC,"y vector","oXYZ",GETONLY(y),},
    229 {"z",0,PARAM_NOSTATIC,"z vector","oXYZ",GETONLY(z),},
     227{"x",0,PARAM_NOSTATIC+PARAM_READONLY,"x vector","oXYZ",GETONLY(x),},
     228{"y",0,PARAM_NOSTATIC+PARAM_READONLY,"y vector","oXYZ",GETONLY(y),},
     229{"z",0,PARAM_NOSTATIC+PARAM_READONLY,"z vector","oXYZ",GETONLY(z),},
    230230
    231231{"new",0,0,"create new Orient object","p oOrient()",PROCEDURE(p_new),},
  • cpp/frams/vm/classes/collectionobj.cpp

    r121 r127  
    3030{"new",0,0,"create new Vector","p oVector()",STATICPROCEDURE(p_new),},
    3131{"sort",0,PARAM_NOSTATIC,"sort elements (in place)","p(o comparator)",PROCEDURE(p_sort),"comparator can be null, giving the \"natural\" sorting order (depending on element type), otherwise it must be a function reference obtained by the \"function FUNCTIONNAME\" operator.\n\nExample:\nfunction compareLastDigit(a,b) {return (a%10)<(b%10);}\nvar v=[16,23,35,42,54,61];\nv.sort(function compareLastDigit);"},
    32 {"iterator",0,PARAM_NOSTATIC,"iterator","o",GETONLY(iterator),},
     32{"iterator",0,PARAM_NOSTATIC+PARAM_READONLY,"iterator","o",GETONLY(iterator),},
    3333{0,0,0,},
    3434};
     
    4444 "var i;\nfor(i=0;i<d.size;i++) Simulator.print(d.getKey(i)+\" is \"+d.get(i));",},
    4545{"clear",0,PARAM_NOSTATIC,"clear data","p()",PROCEDURE(p_clear),},
    46 {"size",0,PARAM_NOSTATIC,"element count","d",GETONLY(size),},
     46{"size",0,PARAM_NOSTATIC+PARAM_READONLY,"element count","d",GETONLY(size),},
    4747{"remove",0,PARAM_NOSTATIC,"remove named or indexed element","p(x key)",PROCEDURE(p_remove),},
    4848{"get",0,PARAM_NOSTATIC,"get named or indexed element","p x(x key)",PROCEDURE(p_get),},
Note: See TracChangeset for help on using the changeset viewer.