diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm b/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm index 8ca0fd5d25..f3ae89276b 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm +++ b/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm @@ -324,7 +324,7 @@ void EditBoxImplMac::setPlaceholderFont(const char* pFontName, int fontSize) return; } - _sysEdit.placeholderAttributes[NSFontAttributeName] = font; + [_sysEdit.placeholderAttributes setObject:font forKey:NSFontAttributeName]; /* reload placeholder */ const char *placeholder = [_sysEdit.textField.cell placeholderAttributedString].string.UTF8String; @@ -343,7 +343,7 @@ void EditBoxImplMac::setFontColor(const Color3B& color) void EditBoxImplMac::setPlaceholderFontColor(const Color3B& color) { NSColor *nsColor = [NSColor colorWithCalibratedRed:color.r/255.f green:color.g / 255.f blue:color.b / 255.f alpha:1.0f]; - _sysEdit.placeholderAttributes[NSForegroundColorAttributeName] = nsColor; + [_sysEdit.placeholderAttributes setObject:nsColor forKey:NSForegroundColorAttributeName]; /* reload placeholder */ const char *placeholder = [_sysEdit.textField.cell placeholderAttributedString].string.UTF8String;