Well, I agree they are a bit confusing, but they both are useful. It seems
appropriate to construct a Scale9Sprite with a file and capInsets.
Especially since for some reason setting the cap insets later (by calling
setCapInsets()) doesn't seem to work. (I haven't had the time to look into
that..) Maybe we could rename one initWithFile to something like
'initWithCapInsetsAndFile, but throughout cocos2d-x all create functions
are just called 'create', so there wouldn't be much of a point to that. I
would prefer a class that WORKS to a class that is 'less confusing'. ;)

But feel free to do as you see fit. :)


2013/1/21 James Chen <notifications@github.com>

> In extensions/GUI/CCControlExtension/CCScale9Sprite.cpp:
>
> > @@ -468,7 +468,7 @@ bool CCScale9Sprite::initWithFile(CCRect capInsets, const char* file)
> >  CCScale9Sprite* CCScale9Sprite::create(CCRect capInsets, const char* file)
> >  {
> >      CCScale9Sprite* pReturn = new CCScale9Sprite();
> > -    if ( pReturn && pReturn->initWithFile(file, capInsets) )
> > +    if ( pReturn && pReturn->initWithFile(capInsets, file) )
>
> Oops, who make these two create and initWithFile.
> I think we just need one. We should delete one.
> What's your opinion?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/cocos2d/cocos2d-x/pull/1874/files#r2712991>.
>
>