Hi~all.
I was codeing in Cocos2dx-2.1.0-wp8-2.0-alpha and tried to communicate between nodes by using the CCNotificationObserver.
I found code in CCNotificationCenter construction below:
CCNotificationObserver::CCNotificationObserver(….,name,…)
{
m_name = new char[strlen(name)+1];
memset(m_name,0,strlen(name)+1);
>
string orig (name);//
//bug fix me orig.copy(m_name,strlen(name),0);
}
So seems m_name always be 0,and this makes “postNotification(const char name, CCObjectobject)” disabled:
void postNotification(const char name, CCObjectobject)
….
if (!strcmp(name,observer~~>getName))
observer~~>performSelector(object);
….
I wonder if CCNotificationObserver is already deprecated or someother ways to do the work?