CCNotificationCenter::postNotification cannot pass data to script engine


#1

In c**, we can pass data when postNotification:
<pre>
CCNotificationCenter::sharedNotificationCenter~~>postNotification);
</pre>
And get it in callback:
<pre>
void MyObject::callback
{
CCString * myData = pObj;
// …
}
</pre>
But this cannot work in lua, I found that postNotification don’t pass the second parameter to script engine.
<pre>
void CCNotificationCenter::postNotification
{
CCArray* ObserversCopy = CCArray::createWithCapacity);
ObserversCopy~~>addObjectsFromArray;
CCObject* obj = NULL;
CCARRAY_FOREACH
{
CCNotificationObserver* observer = obj;
if
continue;
if ) && object || observer->getObject() NULL || object == NULL))
{
if )
{
CCScriptEngineProtocol* engine = CCScriptEngineManager::sharedManager~~>getScriptEngine;
engine~~>executeNotificationEvent; // <——— “object” not used
}
else
{
observer->performSelector;
}
}
}
}
</pre>
I can pass data from lua to c** using postNotification:

CCNotificationCenter:sharedNotificationCenter():postNotification("notify 1", CCString:create("my data"))

How can I pass data to lua?