/usr/share/GNUstep/Documentation/EOControl/EOObserver.html is in libgnustep-dl2-dev 0.12.0-15.1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>EOObserver</title>
</head>
<body>
<font face="serif">
<a href="EOControl.html">Up</a>
<br />
<h1><a name="title$EOObserver">EOObserver</a></h1>
<h3>Authors</h3>
<dl>
<dt>Mirko Viviani (<a href="mailto:mirko.viviani@gmail.com"><code>mirko.viviani@gmail.com</code></a>)</dt>
<dd>
</dd>
<dt>David Ayers (<a href="mailto:ayers@fsfe.org"><code>ayers@fsfe.org</code></a>)</dt>
<dd>
</dd>
</dl>
<p><b>Version:</b> 25326</p>
<p><b>Date:</b> 2007-07-12 08:39:22 +0200 (Don, 12. Jul 2007)</p>
<blockquote>
</blockquote>
<p><b>Copyright:</b> (C)
2000,2002,2003,2004,2005 Free Software
Foundation, Inc.
</p>
<div>
<hr width="50%" align="left" />
<h3>Contents -</h3>
<ol>
<li>
<a href="#001000000000">Software documentation for the EODelayedObserver class</a>
</li>
<li>
<a href="#002000000000">Software documentation for the EODelayedObserverQueue
class</a>
</li>
<li>
<a href="#003000000000">Software documentation for the EOObserverCenter class</a>
</li>
<li>
<a href="#004000000000">Software documentation for the EOObserverProxy class</a>
</li>
<li>
<a href="#005000000000">Software documentation for the NSObject(EOObserver)
category</a>
</li>
<li>
<a href="#006000000000">Software documentation for the EOObserving protocol</a>
</li>
<li>
<a href="#007000000000">EOObserver types</a>
</li>
</ol>
<hr width="50%" align="left" />
</div>
<h1><a name="001000000000">
Software documentation for the EODelayedObserver class
</a></h1>
<h2><a name="class$EODelayedObserver">EODelayedObserver</a> : NSObject</h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>EOControl/EOObserver.h</dd>
</dl>
</blockquote>
<blockquote>
<dl>
<dt><b>Conforms to:</b></dt>
<dd><a rel="gsdoc" href="#protocol$(EOObserving)">EOObserving</a></dd>
</dl>
</blockquote>
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="50%" align="left" />
<a href="#_EODelayedObserver_ivars">Instance Variables</a>
<br/><br/>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="EOObserver.html#method$EODelayedObserver-discardPendingNotification">-discardPendingNotification</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EODelayedObserver-objectWillChange$">-objectWillChange:</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EODelayedObserver-observerQueue">-observerQueue</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EODelayedObserver-priority">-priority</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EODelayedObserver-subjectChanged">-subjectChanged</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$EODelayedObserver-discardPendingNotification">discardPendingNotification </a></h3>
- (void) <b>discardPendingNotification</b>;<br />
<div class="desc">
Discards all pending notifications of the receiver
by dequeuing the receiver from the observer queue
returned by
<a rel="gsdoc" href="#method$EODelayedObserver-observerQueue">
-observerQueue
</a>
. Subclasses should invoke this method in thier dealloc
implementations.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EODelayedObserver-objectWillChange$">objectWillChange: </a></h3>
- (void) <b>objectWillChange:</b> (id)subject;<br />
<div class="desc">
<a rel="gsdoc" href="#protocol$(EOObserving)"><EOObserving></a>
implementation which enqueues the receiver
in the queue returned by observerQueue.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EODelayedObserver-observerQueue">observerQueue </a></h3>
- (<a rel="gsdoc" href="#class$EODelayedObserverQueue">EODelayedObserverQueue</a>*) <b>observerQueue</b>;<br />
<div class="desc">
Returns the receivers observer queue.
EODelayedObserver returns
<a rel="gsdoc" href="#method$EODelayedObserverQueue+defaultObserverQueue">[EODelayedObserverQueue +defaultObserverQueue]</a>
. Subclasses can override this method to return an applicable queue.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EODelayedObserver-priority">priority </a></h3>
- (<a rel="gsdoc" href="#type$EOObserverPriority">EOObserverPriority</a>) <b>priority</b>;<br />
<div class="desc">
Returns the EOObserverPriority of the receiver.
EODelayedObserver returns
EOObserverPriorityThird by default.
Subclasses can override this method to return
the corresponding priority.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EODelayedObserver-subjectChanged">subjectChanged </a></h3>
- (void) <b>subjectChanged</b>;<br />
<div class="desc">
Invoked by
<a rel="gsdoc" href="#method$EODelayedObserverQueue-notifyObserversUpToPriority$">[EODelayedObserverQueue -notifyObserversUpToPriority:]</a>
or <a rel="gsdoc" href="#method$EODelayedObserverQueue-enqueueObserver$">[EODelayedObserverQueue -enqueueObserver:]</a>
. Overridden by subclasses to process the delayed change notification. EODelayesObserver does nothing.
</div>
<hr width="25%" align="left" />
</div>
<a name="_EODelayedObserver_ivars"/> <br/><hr width="50%" align="left" />
<h2>Instance Variables for EODelayedObserver Class</h2>
<h3><a name="ivariable$EODelayedObserver*_next">_next</a></h3>
@public EODelayedObserver* <b>_next</b>;<br />
<div class="desc">
<em>Warning</em> the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically <em>private</em>, it is
intended for internal use within the package, and
you should not use the variable in other code.
</div>
<hr width="25%" align="left" />
<br/><hr width="50%" align="left" /><br/>
<h1><a name="002000000000">
Software documentation for the EODelayedObserverQueue
class
</a></h1>
<h2><a name="class$EODelayedObserverQueue">EODelayedObserverQueue</a> : NSObject</h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>EOControl/EOObserver.h</dd>
</dl>
</blockquote>
<div class="desc">
EODelayedObserverQueue manages the
delayed observer notifications for
<a rel="gsdoc" href="#class$EODelayedObserver">EODelayedObserver</a>
that register with it. A delayed observer may only
register itself with one queue and a fixed
priority. Upon
<a rel="gsdoc" href="#method$EODelayedObserverQueue-notifyObserversUpToPriority$">
[-notifyObserversUpToPriority:]
</a>
all enqueued observers are sent
<a rel="gsdoc" href="#method$EODelayedObserver-subjectChanged">[EODelayedObserver -subjectChanged]</a>
according to the EOObserverPriority of the observer. The first time an observer is enqueued with <a rel="gsdoc" href="#method$EODelayedObserverQueue-enqueueObserver$">[-enqueueObserver:]</a>
(with a priority other than EOObserverPriorityImmediate) the queue registers itself with the <code>NSRunLoop currentRunLoop</code> with EOFlushDelayedObserverRunLoopOrdering to invoke <a rel="gsdoc" href="#method$EODelayedObserverQueue-notifyObserversUpToPriority$">[-notifyObserversUpToPriority:]</a>
with EOObserverPrioritySixth. In general this mechanism is used by
EOAssociation
subclasses and in part
EODisplayGroup
or even
<a rel="gsdoc" href="EOEditingContext.html#class$EOEditingContext">EOEditingContext</a>
.
</div>
<hr width="50%" align="left" />
<a href="#_EODelayedObserverQueue_ivars">Instance Variables</a>
<br/><br/>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="EOObserver.html#method$EODelayedObserverQueue+defaultObserverQueue">+defaultObserverQueue</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EODelayedObserverQueue-dequeueObserver$">-dequeueObserver:</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EODelayedObserverQueue-enqueueObserver$">-enqueueObserver:</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EODelayedObserverQueue-notifyObserversUpToPriority$">-notifyObserversUpToPriority:</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EODelayedObserverQueue-runLoopModes">-runLoopModes</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EODelayedObserverQueue-setRunLoopModes$">-setRunLoopModes:</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$EODelayedObserverQueue+defaultObserverQueue">defaultObserverQueue </a></h3>
+ (<a rel="gsdoc" href="#class$EODelayedObserverQueue">EODelayedObserverQueue</a>*) <b>defaultObserverQueue</b>;<br />
<div class="desc">
Returns the default queue.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EODelayedObserverQueue-dequeueObserver$">dequeueObserver: </a></h3>
- (void) <b>dequeueObserver:</b> (<a rel="gsdoc" href="#class$EODelayedObserver">EODelayedObserver</a>*)observer;<br />
<div class="desc">
Unregisters the <var>observer</var> from the
receiver.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EODelayedObserverQueue-enqueueObserver$">enqueueObserver: </a></h3>
- (void) <b>enqueueObserver:</b> (<a rel="gsdoc" href="#class$EODelayedObserver">EODelayedObserver</a>*)observer;<br />
<div class="desc">
</p>
<p>
Registers the <var>observer</var> with the
receiver so that it will dispatch
<a rel="gsdoc" href="#method$EODelayedObserver-subjectChanged">[EODelayedObserver -subjectChanged]</a>
either immediately, if the observers priority is EOObserverPriorityImmediate, or for the next invocation of <a rel="gsdoc" href="#method$EODelayedObserverQueue-notifyObserversUpToPriority$">-notifyObserversUpToPriority:</a>
. If this method is invoked during the processing of <a rel="gsdoc" href="#method$EODelayedObserverQueue-notifyObserversUpToPriority$">-notifyObserversUpToPriority:</a>
, then the dispatch will be enqueue for the current processing.
</p>
<p>
</p>
<p>
Upon the first invocation within a run loop, this
method registers a callback method to have
<a rel="gsdoc" href="#method$EODelayedObserverQueue-notifyObserversUpToPriority$">
[-notifyObserversUpToPriority:]
</a>
invoked with EOObserverPrioritySixth with the
<code>NSRunLoop currentRunLoop</code> with
EOFlushDelayedObserverRunLoopOrdering
and the receivers run loop modes.
</p>
<p>
</p>
<p>
The <var>observer</var> is not retained and should be
removed from the receiver with
<a rel="gsdoc" href="#method$EODelayedObserverQueue-dequeueObserver$">
[-dequeueObserver:]
</a>
during the EODelayedObservers
<code>NSObject dealloc</code> method.
</p>
<p>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EODelayedObserverQueue-notifyObserversUpToPriority$">notifyObserversUpToPriority: </a></h3>
- (void) <b>notifyObserversUpToPriority:</b> (<a rel="gsdoc" href="#type$EOObserverPriority">EOObserverPriority</a>)priority;<br />
<div class="desc">
</p>
<p>
Dispatches registered observer notifications
by sending
<a rel="gsdoc" href="#method$EODelayedObserver-subjectChanged">[EODelayedObserver -subjectChanged]</a>
to all registered observers of the receiver. During the processing new enqueObserver: methods will be honored. It is up toe the callers to ensure no loops result.
</p>
<p>
</p>
<p>
This method is invoked automatically with
EOObserverPrioritySixth during
each run loop after an invocation of
<a rel="gsdoc" href="#method$EODelayedObserverQueue-enqueueObserver$">
-enqueueObserver:
</a>
.
</p>
<p>
</p>
<p>
Note that unlike the reference implementation, we
dequeue the observer after dispatching
<a rel="gsdoc" href="#method$EODelayedObserver-subjectChanged">[EODelayedObserver -subjectChanged]</a>
.
</p>
<p>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EODelayedObserverQueue-runLoopModes">runLoopModes </a></h3>
- (NSArray*) <b>runLoopModes</b>;<br />
<div class="desc">
Returns the run loop modes the receiver uses when
registering for
<a rel="gsdoc" href="#method$EODelayedObserverQueue-notifyObserversUpToPriority$">
[-notifyObserversUpToPriority:]
</a>
during
<a rel="gsdoc" href="#method$EODelayedObserverQueue-enqueueObserver$">
-enqueueObserver:
</a>
. (see <code>NSRunLoop</code>).
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EODelayedObserverQueue-setRunLoopModes$">setRunLoopModes: </a></h3>
- (void) <b>setRunLoopModes:</b> (NSArray*)modes;<br />
<div class="desc">
Sets the run loop <var>modes</var> the receiver uses
when registering for
<a rel="gsdoc" href="#method$EODelayedObserverQueue-notifyObserversUpToPriority$">
[-notifyObserversUpToPriority:]
</a>
during
<a rel="gsdoc" href="#method$EODelayedObserverQueue-enqueueObserver$">
-enqueueObserver:
</a>
. (see <code>NSRunLoop</code>).
</div>
<hr width="25%" align="left" />
</div>
<a name="_EODelayedObserverQueue_ivars"/> <br/><hr width="50%" align="left" />
<h2>Instance Variables for EODelayedObserverQueue Class</h2>
<h3><a name="ivariable$EODelayedObserverQueue*_haveEntryInNotificationQueue">_haveEntryInNotificationQueue</a></h3>
@protected BOOL <b>_haveEntryInNotificationQueue</b>;<br />
<div class="desc">
<em>Warning</em> the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically <em>private</em>, it is
intended for internal use within the package, and
you should not use the variable in other code.
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$EODelayedObserverQueue*_highestNonEmptyQueue">_highestNonEmptyQueue</a></h3>
@protected unsigned int <b>_highestNonEmptyQueue</b>;<br />
<div class="desc">
<em>Warning</em> the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically <em>private</em>, it is
intended for internal use within the package, and
you should not use the variable in other code.
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$EODelayedObserverQueue*_modes">_modes</a></h3>
@protected NSArray* <b>_modes</b>;<br />
<div class="desc">
<em>Warning</em> the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically <em>private</em>, it is
intended for internal use within the package, and
you should not use the variable in other code.
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$EODelayedObserverQueue*_queue">_queue</a></h3>
@protected EODelayedObserver* <b>_queue</b>;<br />
<div class="desc">
<em>Warning</em> the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically <em>private</em>, it is
intended for internal use within the package, and
you should not use the variable in other code.
</div>
<hr width="25%" align="left" />
<br/><hr width="50%" align="left" /><br/>
<h1><a name="003000000000">
Software documentation for the EOObserverCenter class
</a></h1>
<h2><a name="class$EOObserverCenter">EOObserverCenter</a> : NSObject</h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>EOControl/EOObserver.h</dd>
</dl>
</blockquote>
<div class="desc">
</p>
<p>
This is the central coordinating class of the change
tracking system of EOControl. It manages the
observers
<a rel="gsdoc" href="#protocol$(EOObserving)"><EOObserving></a>
and the objects to be observed. No instances of this class should be needed or created. All methods for coordinating the tracking mechanism are class methods. </p>
<p>
</p>
<p>
Observers must implement the
<a rel="gsdoc" href="#protocol$(EOObserving)"><EOObserving></a>
protocol, in particular <a rel="gsdoc" href="#method$(EOObserving)-objectWillChange$">[<EOObserving>-objectWillChange:]</a>
while the observed objects must invoke [NSObject -willChange]
. Invoke <a rel="gsdoc" href="#method$EOObserverCenter+addObserver$forObject$">[+addObserver:forObject:]</a>
to register an observer for a particular object. That will setup for <a rel="gsdoc" href="#method$(EOObserving)-objectWillChange$">[<EOObserving>-objectWillChange:]</a>
to be invoked on the observer each time [NSObject -willChange]
gets called. To remove an observer invoke <a rel="gsdoc" href="#method$EOObserverCenter+removeObserver$forObject$">+removeObserver:forObject:</a>
. For observers who wish to be notified for every change the methods <a rel="gsdoc" href="#method$EOObserverCenter+addOmniscientObserver$">[+addOmniscientObserver:]</a>
and <a rel="gsdoc" href="#method$EOObserverCenter+removeOmniscientObserver$">[+removeOmniscientObserver:]</a>
can be used. </p>
<p>
</div>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="EOObserver.html#method$EOObserverCenter+addObserver$forObject$">+addObserver:forObject:</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EOObserverCenter+addOmniscientObserver$">+addOmniscientObserver:</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EOObserverCenter+enableObserverNotification">+enableObserverNotification</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EOObserverCenter+notifyObserversObjectWillChange$">+notifyObserversObjectWillChange:</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EOObserverCenter+observerForObject$ofClass$">+observerForObject:ofClass:</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EOObserverCenter+observerNotificationSuppressCount">+observerNotificationSuppressCount</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EOObserverCenter+observersForObject$">+observersForObject:</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EOObserverCenter+removeObserver$forObject$">+removeObserver:forObject:</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EOObserverCenter+removeOmniscientObserver$">+removeOmniscientObserver:</a></li>
<li><a rel="gsdoc" href="EOObserver.html#method$EOObserverCenter+suppressObserverNotification">+suppressObserverNotification</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$EOObserverCenter+addObserver$forObject$">addObserver: forObject: </a></h3>
+ (void) <b>addObserver:</b> (id<<a rel="gsdoc" href="#protocol$(EOObserving)">EOObserving</a>>)observer<b> forObject:</b> (id)object;<br />
<div class="desc">
</p>
<p>
Adds the <var>observer</var> to be notified with a
<a rel="gsdoc" href="#method$(EOObserving)-objectWillChange$">[<EOObserving>-objectWillChange:]</a>
on the first of consecutive [NSObject -willChange]
methods invoked on the <var>object</var>.
</p>
<p>
</p>
<p>
This does not retain the <var>object</var>. It is
the observers responsibility to unregister the
<var>object</var> with
<a rel="gsdoc" href="#method$EOObserverCenter+removeObserver$forObject$">
[+removeObserver:forObject:]
</a>
before the <var>object</var> ceases to exist. The
<var>observer</var> is also not retained. It is the
observers responsibility to unregister before
it ceases to exist.
</p>
<p>
</p>
<p>
Both <var>observer</var> and <var>object</var>
equality are considered equal through pointer
equality, so an <var>observer</var> observing
multiple objects considered
<code>isEqual:</code> will recieve multiple
<var>observer</var> notifications, objects
considered <code>isEqual:</code> may contain
different sets of observers, and an
<var>object</var> can have multiple observers
considered <code>isEqual:</code>.
</p>
<p>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EOObserverCenter+addOmniscientObserver$">addOmniscientObserver: </a></h3>
+ (void) <b>addOmniscientObserver:</b> (id<<a rel="gsdoc" href="#protocol$(EOObserving)">EOObserving</a>>)observer;<br />
<div class="desc">
Adds <var>observer</var> as an omniscient
<var>observer</var> to receive
<a rel="gsdoc" href="#method$(EOObserving)-objectWillChange$">[<EOObserving>-objectWillChange:]</a>
for all objects and <code>nil</code>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EOObserverCenter+enableObserverNotification">enableObserverNotification </a></h3>
+ (void) <b>enableObserverNotification</b>;<br />
<div class="desc">
Decreases the notification suppression count.
This should be called to pair up
<a rel="gsdoc" href="#method$EOObserverCenter+suppressObserverNotification">
[+suppressObserverNotification]
</a>
invocations. When they all have been paired up
<a rel="gsdoc" href="#method$EOObserverCenter+notifyObserversObjectWillChange$">
[+notifyObserversObjectWillChange:]
</a>
will continue to dispatch
<a rel="gsdoc" href="#method$(EOObserving)-objectWillChange$">[<EOObserving>-objectWillChange:]</a>
methods again. If this is invoked when the <a rel="gsdoc" href="#method$EOObserverCenter+observerNotificationSuppressCount">[+observerNotificationSuppressCount]</a>
is 0, this method raises an NSInternalInconsistencyException.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EOObserverCenter+notifyObserversObjectWillChange$">notifyObserversObjectWillChange: </a></h3>
+ (void) <b>notifyObserversObjectWillChange:</b> (id)object;<br />
<div class="desc">
This method is invoked from
[NSObject -willChange]
to dispatch
<a rel="gsdoc" href="#method$(EOObserving)-objectWillChange$">[<EOObserving>-objectWillChange:]</a>
to all observers registered to observe <var>object</var>. This method records the last <var>object</var> it was invoked with so that subsequent invocations with the same <var>object</var> get ignored. Invoke this method with <code>nil</code> as the <var>object</var> to insure that the new changes will be forwarded to the observer. The observer notification can be suppressed with invocations of <a rel="gsdoc" href="#method$EOObserverCenter+suppressObserverNotification">[+suppressObserverNotification]</a>
which must be paired up with invocations of <a rel="gsdoc" href="#method$EOObserverCenter+enableObserverNotification">[+enableObserverNotification]</a>
before they are dispatched again.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EOObserverCenter+observerForObject$ofClass$">observerForObject: ofClass: </a></h3>
+ (id) <b>observerForObject:</b> (id)object<b> ofClass:</b> (Class)targetClass;<br />
<div class="desc">
Returns the first observer of the <var>object</var>
that matches
<a rel="gsdoc" href="EOFault.html#method$EOFault-isKindOfClass$">
[-isKindOfClass:]
</a>
of the <var>targetClass</var>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EOObserverCenter+observerNotificationSuppressCount">observerNotificationSuppressCount </a></h3>
+ (unsigned) <b>observerNotificationSuppressCount</b>;<br />
<div class="desc">
Returns the current observer notification suppress
count.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EOObserverCenter+observersForObject$">observersForObject: </a></h3>
+ (NSArray*) <b>observersForObject:</b> (id)object;<br />
<div class="desc">
Returns an array of observers that have been
registered of <var>object</var>. Note that this
class is considered 'final' and that for efficiency
the observers are accessed directly internally, thus
overriding this method could lead to unexpected
results. In other words, if you must subclass then
you should override all methods that access the
internal map if this method is overridden to use a
different store.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EOObserverCenter+removeObserver$forObject$">removeObserver: forObject: </a></h3>
+ (void) <b>removeObserver:</b> (id<<a rel="gsdoc" href="#protocol$(EOObserving)">EOObserving</a>>)observer<b> forObject:</b> (id)object;<br />
<div class="desc">
Removes the <var>observer</var> from being notified
on
[NSObject -willChange]
invocations of <var>object</var>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EOObserverCenter+removeOmniscientObserver$">removeOmniscientObserver: </a></h3>
+ (void) <b>removeOmniscientObserver:</b> (id<<a rel="gsdoc" href="#protocol$(EOObserving)">EOObserving</a>>)observer;<br />
<div class="desc">
Removes <var>observer</var> as an omniscient
<var>observer</var>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$EOObserverCenter+suppressObserverNotification">suppressObserverNotification </a></h3>
+ (void) <b>suppressObserverNotification</b>;<br />
<div class="desc">
Increases the notification suppression count.
When the count is non zero
<a rel="gsdoc" href="#method$EOObserverCenter+notifyObserversObjectWillChange$">
[+notifyObserversObjectWillChange:]
</a>
invocations do nothing. Call
<a rel="gsdoc" href="#method$EOObserverCenter+enableObserverNotification">
[+enableObserverNotification]
</a>
a matching amount of times to enable the dispatch of
those notifications again.
</div>
<hr width="25%" align="left" />
</div>
<h1><a name="004000000000">
Software documentation for the EOObserverProxy class
</a></h1>
<h2><a name="class$EOObserverProxy">EOObserverProxy</a> : <a rel="gsdoc" href="#class$EODelayedObserver">EODelayedObserver</a></h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>EOControl/EOObserver.h</dd>
</dl>
</blockquote>
<div class="desc">
This is a convenience class which is initialized with a
target, an action method and a priority, to have the
action method invoked on the target when the
subjectChanged method is invoked by the
EODelayedObserverQueue.
</div>
<hr width="50%" align="left" />
<a href="#_EOObserverProxy_ivars">Instance Variables</a>
<br/><br/>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="EOObserver.html#method$EOObserverProxy-initWithTarget$action$priority$">-initWithTarget:action:priority:</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$EOObserverProxy-initWithTarget$action$priority$">initWithTarget: action: priority: </a></h3>
- (id) <b>initWithTarget:</b> (id)target<b> action:</b> (SEL)action<b> priority:</b> (<a rel="gsdoc" href="#type$EOObserverPriority">EOObserverPriority</a>)priority;<br />
<div class="desc">
Initializes the receiver to dispatch
<var>action</var> to <var>target</var> upon
processing
<a rel="gsdoc" href="#method$EODelayedObserver-subjectChanged">
-subjectChanged
</a>
. The receiver uses <var>priority</var> for the
<a rel="gsdoc" href="#class$EODelayedObserverQueue">EODelayedObserverQueue</a>
. Target is not retained.
</div>
<hr width="25%" align="left" />
</div>
<a name="_EOObserverProxy_ivars"/> <br/><hr width="50%" align="left" />
<h2>Instance Variables for EOObserverProxy Class</h2>
<h3><a name="ivariable$EOObserverProxy*_action">_action</a></h3>
@protected SEL <b>_action</b>;<br />
<div class="desc">
<em>Warning</em> the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically <em>private</em>, it is
intended for internal use within the package, and
you should not use the variable in other code.
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$EOObserverProxy*_priority">_priority</a></h3>
@protected EOObserverPriority <b>_priority</b>;<br />
<div class="desc">
<em>Warning</em> the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically <em>private</em>, it is
intended for internal use within the package, and
you should not use the variable in other code.
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$EOObserverProxy*_target">_target</a></h3>
@protected id <b>_target</b>;<br />
<div class="desc">
<em>Warning</em> the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically <em>private</em>, it is
intended for internal use within the package, and
you should not use the variable in other code.
</div>
<hr width="25%" align="left" />
<br/><hr width="50%" align="left" /><br/>
<h1><a name="005000000000">
Software documentation for the NSObject(EOObserver)
category
</a></h1>
<h2>NSObject(<a name="category$NSObject(EOObserver)">EOObserver</a>)</h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>EOControl/EOObserver.h</dd>
</dl>
</blockquote>
<div class="desc">
<em>Description forthcoming.</em>
</div>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="EOObserver.html#method$NSObject(EOObserver)-willChange">-willChange</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$NSObject(EOObserver)-willChange">willChange </a></h3>
- (void) <b>willChange</b>;<br />
<div class="desc">
This is the hook to allow observers to be notified
that the state of the receiver is about to change. The
method should be called in all mutating accessor
methods before the state of the receiver changes.
This method invokes
<a rel="gsdoc" href="#method$EOObserverCenter+notifyObserversObjectWillChange$">[EOObserverCenter +notifyObserversObjectWillChange:]</a>
with the receiver. It is responsible for invoking <a rel="gsdoc" href="#method$(EOObserving)-objectWillChange$">[<EOObserving>-objectWillChange:]</a>
for all corresponding observers.
</div>
<hr width="25%" align="left" />
</div>
<h1><a name="006000000000">
Software documentation for the EOObserving protocol
</a></h1>
<h2><a name="protocol$(EOObserving)">EOObserving</a></h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>EOControl/EOObserver.h</dd>
</dl>
</blockquote>
<blockquote>
<dl>
<dt><b>Conforms to:</b></dt>
<dd>NSObject</dd>
</dl>
</blockquote>
<div class="desc">
<em>Description forthcoming.</em>
</div>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="EOObserver.html#method$(EOObserving)-objectWillChange$">-objectWillChange:</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$(EOObserving)-objectWillChange$">objectWillChange: </a></h3>
- (void) <b>objectWillChange:</b> (id)subject;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
</div>
<h1><a name="007000000000">EOObserver types</a></h1>
<p>
</p>
<h3><a name="type$EOObserverPriority">EOObserverPriority</a></h3>
typedef enum ... EOObserverPriority;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<br />
<a href="EOControl.html">Up</a>
</font>
</body>
</html>
|