objective c - How does cocos2d CCMenu accesses private member variable of base class without any error? -
This is not a cocos2d question, but the objective is more about the question.
There is an ancestor of two CCNode and Seismannu class CCNode ccMenu CC menus, directly accessing a variable member of the CCND variable, but they do not get any error (or warning).
While keeping this problem in mind when trying to sub-class the Seismannu, While creating for simulator, encoded did not make any errors, but threw errors by saying 'kids' undeclared' (which makes sense!)
Then I'm really confused .. it related Does not look like any compiler settings (cocos2d is compiled without any problem for any kind.)
< P> Seeing CCNode headers,
children_ does not seem private, CCNode Interf There is no visibility modifier in the file, and the default is @ protected , so the frequency should appear in sub-sections of CCNode.
Comments
Post a Comment