mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-26 21:47:04 +00:00
Fixed: [pasteboard declareTypes:… owner:nil]; would emit a warning.
Without this fix, declaring a type with a nil owner would cause a "DEPRECATED: object cannot be nil" warning to be issued. This fix now allows a nil owner without warning.
This commit is contained in:
@@ -191,10 +191,12 @@ var CPPasteboards = nil,
|
||||
_owners = @{};
|
||||
_provided = @{};
|
||||
|
||||
var count = _types.length;
|
||||
|
||||
while (count--)
|
||||
[_owners setObject:anOwner forKey:_types[count]];
|
||||
if (anOwner)
|
||||
{
|
||||
var count = _types.length;
|
||||
while (count--)
|
||||
[_owners setObject:anOwner forKey:_types[count]];
|
||||
}
|
||||
|
||||
if (_nativePasteboard && shouldUpdate)
|
||||
{
|
||||
@@ -205,6 +207,7 @@ var CPPasteboards = nil,
|
||||
_nativePasteboard.declareTypes_(nativeTypes);
|
||||
_changeCount = _nativePasteboard.changeCount();
|
||||
}
|
||||
|
||||
return ++_changeCount;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user