mirror of https://github.com/axmolengine/axmol.git
fix annoying "callBackName cannot be found" log
This commit is contained in:
parent
45bbc8a1ae
commit
b7779180b1
|
@ -1135,6 +1135,9 @@ bool CSLoader::bindCallback(const std::string &callbackName,
|
|||
cocos2d::ui::Widget *sender,
|
||||
cocos2d::Node *handler)
|
||||
{
|
||||
if (callbackName.empty())
|
||||
return false;
|
||||
|
||||
auto callbackHandler = dynamic_cast<WidgetCallBackHandlerProtocol *>(handler);
|
||||
if (callbackHandler) //The handler can handle callback
|
||||
{
|
||||
|
@ -1170,7 +1173,6 @@ bool CSLoader::bindCallback(const std::string &callbackName,
|
|||
CCLOG("callBackName %s cannot be found", callbackName.c_str());
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
bool CSLoader::isWidget(const std::string &type)
|
||||
|
|
Loading…
Reference in New Issue