CocosSharp icon indicating copy to clipboard operation
CocosSharp copied to clipboard

CCNode.Children.Add is confusing as it doesn't add a child, but CCNode.AddChild does

Open vchelaru opened this issue 10 years ago • 0 comments

If Children.Add is not intended to be used, then it should not be available. Users of Xamarin Forms use .Children.Add to add children to a view, so they would expect this to work. The compiler doesn't stop you from calling this, you just don't get the expected results. Furthermore, this function is "dishonest" because it really doesn't add the child (or at least the result isn't the same as AddChild).

I expected that AddChild was a "shortcut" method similar to PositionX being a shortcut for Position.X

vchelaru avatar May 20 '15 14:05 vchelaru