Various fixes to support creating images with specifying the size upfront.

[#41 milestone:0.5.2 state:resolved];
[#20 milestone:0.5.2 state:resolved];
This commit is contained in:
Ross Boucher committed 2008-09-17 22:39:25 -07:00
1 parent 53d4a714e2
commit e95c2b9efc
3 files changed
+49 -23

No files matched your search

+4 -4
View File
@@ -219,7 +219,7 @@ var _CPNotificationCenterPostNotification = function(/* CPNotificationCenter */
while (key = [keys nextObject])
{
var observers = [_objectObservers objectForKey:key],
count = observers.length;
count = observers ? observers.length : 0;
while (count--)
if ([observers[count] observer] == anObserver)
@@ -231,7 +231,7 @@ var _CPNotificationCenterPostNotification = function(/* CPNotificationCenter */
observers.splice(count, 1);
}
if (observers.length == 0)
if (!observers || observers.length == 0)
removedKeys.push(key);
}
}
@@ -239,7 +239,7 @@ var _CPNotificationCenterPostNotification = function(/* CPNotificationCenter */
{
var key = [anObject hash],
observers = [_objectObservers objectForKey:key];
count = observers.length;
count = observers ? observers.length : 0;
while (count--)
if ([observers[count] observer] == anObserver)
@@ -251,7 +251,7 @@ var _CPNotificationCenterPostNotification = function(/* CPNotificationCenter */
observers.splice(count, 1)
}
if (observers.length == 0)
if (!observers || observers.length == 0)
removedKeys.push(key);
}