// if all text deleted, show placeholder string
if (nStrLen <= nDeleteLen)
m_pInputText = new std::string;
m_nCharCount = 0;
CCLabelTTF::setString(m_pPlaceHolder->c_str()); // my subclass setString() have no opportunity to be called
i have a subclass inherit from CCTextFieldTTF to show “\\*” for password input , i found that the virtual setString() is not be called when i delete the last character, now i have to judge CCTextFieldTTF::m_nCharCount is or not zero to clear my text cache.
my program is fine now, but i think this is useful information for you