From bfed503388041e020b1fe752328f3524c706c796 Mon Sep 17 00:00:00 2001 From: Alexander Malmberg Date: Sat, 15 Feb 2003 14:58:25 +0000 Subject: [PATCH] (-performSelector:target:argument:order:modes:): Order the performers correctly (lower orders first). Correct the documentation. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15964 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSRunLoop.m | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5d4913544..da9824ab5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-02-15 15:53 Alexander Malmberg + + * Source/NSRunLoop.m (-performSelector:target:argument:order:modes:): + Order the performers correctly (lower order values first). Correct + the documentation. + 2003-02-13 Richard Frith-Macdonald * Source/NSTimeZone.m: Fix memory leak when making absolute diff --git a/Source/NSRunLoop.m b/Source/NSRunLoop.m index 25970663d..70451e976 100644 --- a/Source/NSRunLoop.m +++ b/Source/NSRunLoop.m @@ -2190,11 +2190,13 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt) } /** - * Sets up repeated sending of aSelector to target with argument.
- * The selector is sent in each runloop iteration until cancelled.
+ * Sets up sending of aSelector to target with argument.
+ * The selector is sent before the next runloop iteration (unless + * cancelled before then).
* The target and argument objects are not retained.
* The order value is used to determine the order in which messages - * are sent if multiple messages have been set up. + * are sent if multiple messages have been set up. Messages with a lower + * order value are sent first. */ - (void) performSelector: (SEL)aSelector target: (id)target @@ -2239,7 +2241,7 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt) GSRunLoopPerformer *p; p = GSIArrayItemAtIndex(performers, i).obj; - if (p->order <= order) + if (p->order > order) { GSIArrayInsertItem(performers, (GSIArrayItem)item, i); break;