Files
cappuccino/Foundation
Ilya Kulakov 3886f27acd Fix crash if an observer is set between willChange…/didChange…
When you add an observer to an object first time, its class is
implicitly changed to a KVO_originalClassName (subclass of original
class). This subclass adds willChange…/didChange… methods for
observable properties.
If you send willChange… before you add an observer, it does nothing.
But if you send didChange… just after, the app will crash, because
new KVO_originalClassName nerver receives willChange…

The idea is to maintain counter of all received willChange… messages
(per key) and decrease it in didChange…
When KVO_originalClassName is created and didChange… is received
(without opening willChange… to new class), exception is not thrown
immediately, but the counter is checked first.
If it's greater than 0, then didChange… just closes
an unboserved willChange… Otherwise exception is thrown, as expected.
2012-07-14 19:32:25 +07:00
..
2010-12-26 01:34:37 +02:00
2011-01-24 11:05:48 +02:00
2010-12-26 01:34:37 +02:00
2012-05-13 14:26:19 +01:00
2012-06-20 11:05:22 -07:00
2011-01-24 11:05:48 +02:00
2010-12-26 01:34:37 +02:00
2010-12-26 01:34:37 +02:00
2011-05-04 19:07:06 +02:00
2012-07-09 15:47:26 -07:00
2010-12-26 01:34:37 +02:00
2010-12-26 01:34:37 +02:00
2011-11-23 00:28:27 +00:00
2010-02-05 22:27:13 -08:00
2010-12-26 01:34:37 +02:00
2010-12-26 01:34:37 +02:00
2012-05-26 00:22:23 +01:00
2012-02-24 19:44:26 +00:00
2010-12-26 01:34:37 +02:00
2011-01-24 11:05:48 +02:00
2010-12-26 01:34:37 +02:00
2012-07-08 21:26:47 +01:00
2012-07-08 21:26:47 +01:00
2011-01-24 11:05:48 +02:00
2012-07-04 17:29:28 -04:00
2010-12-16 19:16:33 +02:00
2012-04-12 10:45:01 -04:00
2011-01-24 11:05:48 +02:00
2010-12-16 19:16:33 +02:00
2010-12-16 19:16:33 +02:00
2008-09-04 03:52:20 -07:00
2011-05-26 23:59:08 -04:00