Overview
Comment: | Add -[performSelector:onThread:afterDelay:]. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
4fd5559652df7b630188d4eab71e2598 |
User & Date: | js on 2012-09-16 13:23:07 |
Other Links: | manifest | tags |
Context
2012-09-16
| ||
15:27 | Prefix all private methods with OF_. check-in: c137da5e5b user: js tags: trunk | |
13:23 | Add -[performSelector:onThread:afterDelay:]. check-in: 4fd5559652 user: js tags: trunk | |
13:23 | Slightly refactor OFRunLoop. check-in: 0cfbbb367a user: js tags: trunk | |
Changes
Modified src/OFObject.h from [69a725f33c] to [38e57fe783].
︙ | ︙ | |||
120 121 122 123 124 125 126 127 128 129 130 131 132 133 | typedef struct of_rectangle_t { of_point_t origin; of_dimension_t size; } of_rectangle_t; @class OFString; /** * \brief The protocol which all root classes implement. */ @protocol OFObject /** * \brief Returns the class of the object. | > | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | typedef struct of_rectangle_t { of_point_t origin; of_dimension_t size; } of_rectangle_t; @class OFString; @class OFThread; /** * \brief The protocol which all root classes implement. */ @protocol OFObject /** * \brief Returns the class of the object. |
︙ | ︙ | |||
629 630 631 632 633 634 635 636 637 638 639 640 641 642 | * 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. */ | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | * 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; /** * \brief Performs the specified selector on the specified thread after the * specified delay. * * \param selector The selector to perform * \param thread The thread on which to perform the selector * \param delay The delay after which the selector will be performed */ - (void)performSelector: (SEL)selector onThread: (OFThread*)thread afterDelay: (double)delay; /** * \brief Performs the specified selector on the specified thread with the * specified object after the specified delay. * * \param selector The selector to perform * \param thread The thread on which to perform the selector * \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 onThread: (OFThread*)thread withObject: (id)object afterDelay: (double)delay; /** * \brief Performs the specified selector on the specified thread with the * specified objects after the specified delay. * * \param selector The selector to perform * \param thread The thread on which to perform the selector * \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 onThread: (OFThread*)thread withObject: (id)object1 withObject: (id)object2 afterDelay: (double)delay; @end /** * \brief A protocol for the creation of copies. */ |
︙ | ︙ |
Modified src/OFObject.m from [6a36e235dc] to [91d44503b0].
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #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" | > > | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #ifdef __QNX__ # include <sys/syspage.h> #endif #import "OFObject.h" #import "OFTimer.h" #import "OFThread.h" #import "OFRunLoop.h" #import "OFAllocFailedException.h" #import "OFEnumerationMutationException.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFMemoryNotPartOfObjectException.h" #import "OFNotImplementedException.h" |
︙ | ︙ | |||
615 616 617 618 619 620 621 622 623 624 625 626 627 628 | [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) | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | [OFTimer scheduledTimerWithTimeInterval: delay target: self selector: selector object: object object: object repeats: NO]; objc_autoreleasePoolPop(pool); } - (void)performSelector: (SEL)selector onThread: (OFThread*)thread afterDelay: (double)delay { void *pool = objc_autoreleasePoolPush(); [[thread runLoop] addTimer: [OFTimer timerWithTimeInterval: delay target: self selector: selector repeats: NO]]; objc_autoreleasePoolPop(pool); } - (void)performSelector: (SEL)selector onThread: (OFThread*)thread withObject: (id)object afterDelay: (double)delay { void *pool = objc_autoreleasePoolPush(); [[thread runLoop] addTimer: [OFTimer timerWithTimeInterval: delay target: self selector: selector object: object repeats: NO]]; objc_autoreleasePoolPop(pool); } - (void)performSelector: (SEL)selector onThread: (OFThread*)thread withObject: (id)object withObject: (id)otherObject afterDelay: (double)delay { void *pool = objc_autoreleasePoolPush(); [[thread runLoop] addTimer: [OFTimer timerWithTimeInterval: delay target: self selector: selector object: object object: object repeats: NO]]; objc_autoreleasePoolPop(pool); } - (const char*)typeEncodingForSelector: (SEL)selector { #if defined(OF_OBJFW_RUNTIME) |
︙ | ︙ |