add deprecation warning for class that have themeClass implemented

This commit is contained in:
Klaas Pieter Annema committed 2010-10-25 16:14:33 +02:00
1 parent 6e9f82212b
commit c7fdad883a
1 file changed
+6 -1
+6 -1
View File
@@ -142,6 +142,11 @@ var CPThemesByName = { },
{
if ([aClass respondsToSelector:@selector(defaultThemeClass)])
className = [aClass defaultThemeClass];
else if ([aClass respondsToSelector:@selector(themeClass)])
{
CPLog.warn(@"%@ themeClass is deprecated in favor of defaultThemeClass",CPStringFromClass([anObject class]));
className = [aClass themeClass];
}
else
return nil;
}
@@ -247,7 +252,7 @@ var CPThemesByName = { },
var attributes = [anObject _themeAttributeDictionary],
attributeName = nil,
attributeNames = [attributes keyEnumerator],
objectThemeClass = [[anObject class] defaultThemeClass];
objectThemeClass = [anObject themeClass];
while (attributeName = [attributeNames nextObject])
[self _recordAttribute:[attributes objectForKey:attributeName] forClass:objectThemeClass];