Overview
Comment: | Add -[OFObject performSelector:afterDelay:]. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
5e067285c85a508f86ba71af8cf5741b |
User & Date: | js on 2012-09-14 06:09:19 |
Other Links: | manifest | tags |
Context
2012-09-14
| ||
07:03 | Create the current OFRunLoop on demand. check-in: 2193480a94 user: js tags: trunk | |
06:09 | Add -[OFObject performSelector:afterDelay:]. check-in: 5e067285c8 user: js tags: trunk | |
05:36 | OFRunLoop: Remove the key for the stream. check-in: 13eb2bf77b user: js tags: trunk | |
Changes
Modified src/OFObject.h from [65abbe11ec] to [69a725f33c].
︙ | ︙ | |||
205 206 207 208 209 210 211 | - (id)performSelector: (SEL)selector withObject: (id)object; /** * \brief Performs the specified selector with the specified objects. * * \param selector The selector to perform | | | | | | | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | - (id)performSelector: (SEL)selector withObject: (id)object; /** * \brief Performs the specified selector with the specified objects. * * \param selector The selector to perform * \param object1 The first object that is passed to the method specified by the * selector * \param object2 The second object that is passed to the method specified by * the selector * \return The object returned by the method specified by the selector */ - (id)performSelector: (SEL)selector withObject: (id)object1 withObject: (id)object2; /** * \brief Checks two objects for equality. * * Classes containing data (like strings, arrays, lists etc.) should reimplement * this! * |
︙ | ︙ | |||
593 594 595 596 597 598 599 600 601 602 603 604 605 606 | * \brief Deallocates the object. * * It is automatically called when the retain count reaches zero. * * This also frees all memory in its memory pool. */ - (void)dealloc; @end /** * \brief A protocol for the creation of copies. */ @protocol OFCopying /** | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | * \brief Deallocates the object. * * It is automatically called when the retain count reaches zero. * * This also frees all memory in its memory pool. */ - (void)dealloc; /** * \brief Performs the specified selector after the specified delay. * * \param selector The selector to perform * \param delay The delay after which the selector will be performed */ - (void)performSelector: (SEL)selector afterDelay: (double)delay; /** * \brief Performs the specified selector with the specified object after the * specified delay. * * \param selector The selector to perform * \param object The object that is passed to the method specified by the * selector * \param delay The delay after which the selector will be performed */ - (void)performSelector: (SEL)selector withObject: (id)object afterDelay: (double)delay; /** * \brief Performs the specified selector with the specified objects after the * specified delay. * * \param selector The selector to perform * \param object1 The first object that is passed to the method specified by the * selector * \param object2 The second object that is passed to the method specified by * the selector * \param delay The delay after which the selector will be performed */ - (void)performSelector: (SEL)selector withObject: (id)object1 withObject: (id)object2 afterDelay: (double)delay; @end /** * \brief A protocol for the creation of copies. */ @protocol OFCopying /** |
︙ | ︙ |
Modified src/OFObject.m from [9817511d97] to [6a36e235dc].
︙ | ︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #include <assert.h> #ifdef __QNX__ # include <sys/syspage.h> #endif #import "OFObject.h" #import "OFAllocFailedException.h" #import "OFEnumerationMutationException.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFMemoryNotPartOfObjectException.h" #import "OFNotImplementedException.h" | > | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #include <assert.h> #ifdef __QNX__ # include <sys/syspage.h> #endif #import "OFObject.h" #import "OFTimer.h" #import "OFAllocFailedException.h" #import "OFEnumerationMutationException.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFMemoryNotPartOfObjectException.h" #import "OFNotImplementedException.h" |
︙ | ︙ | |||
572 573 574 575 576 577 578 579 580 581 582 583 584 585 | withObject: (id)otherObject { id (*imp)(id, SEL, id, id) = (id(*)(id, SEL, id, id))[self methodForSelector: selector]; return imp(self, selector, object, otherObject); } - (const char*)typeEncodingForSelector: (SEL)selector { #if defined(OF_OBJFW_RUNTIME) const char *ret; if ((ret = objc_get_type_encoding(object_getClass(self), | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | withObject: (id)otherObject { id (*imp)(id, SEL, id, id) = (id(*)(id, SEL, id, id))[self methodForSelector: selector]; return imp(self, selector, object, otherObject); } - (void)performSelector: (SEL)selector afterDelay: (double)delay { void *pool = objc_autoreleasePoolPush(); [OFTimer scheduledTimerWithTimeInterval: delay target: self selector: selector repeats: NO]; objc_autoreleasePoolPop(pool); } - (void)performSelector: (SEL)selector withObject: (id)object afterDelay: (double)delay { void *pool = objc_autoreleasePoolPush(); [OFTimer scheduledTimerWithTimeInterval: delay target: self selector: selector object: object repeats: NO]; objc_autoreleasePoolPop(pool); } - (void)performSelector: (SEL)selector withObject: (id)object withObject: (id)otherObject afterDelay: (double)delay { void *pool = objc_autoreleasePoolPush(); [OFTimer scheduledTimerWithTimeInterval: delay target: self selector: selector object: object object: object repeats: NO]; objc_autoreleasePoolPop(pool); } - (const char*)typeEncodingForSelector: (SEL)selector { #if defined(OF_OBJFW_RUNTIME) const char *ret; if ((ret = objc_get_type_encoding(object_getClass(self), |
︙ | ︙ |