Trouble with use of runModalSession in custom event loop.
Gavin Parker <[email protected]> Mon, 13 Apr 2026 20:06:29 -0700
| Newsgroups | gmane.comp.lib.gnustep.general |
|---|---|
| Message-ID | <CAOxJ3SjkcpgB0UbYTr2w9rdkfwJ6BG5K6QX_Oixk=RZeH2GvcQ@mail.gmail.com> |
Hi all!
I'm trying to port an application from MacOS to GNUStep. This application
has a custom event loop that looks like this:
```
- (int)pending {
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
/* (we subclass NSApplication because we want to track when sendEvent is
called; this is the best way I can find of knowing how to know when the
application has an event ready.) */
MwBool isPending = [self->application pending];
/* self->modalSession is created when our window is created, and ends when
the window is closed. */
[self->application runModalSession:self->modalSession];
[pool release];
return _forceRender || _eventsPending || isPending;
};
```
Doing this spams the terminal with this log, and I don't get any output
from my application:
Calling [MilskoCocoaApplication -runModalSession:] with incorrect
signature. Method has q24@0:
8^{_NSModalSession=qq@^{_NSModalSession}}16 (q24@0:8^{_NSModalSession=qq@
^{_NSModalSession}}16)
, selector has q24@0:8^{_NSModalSession=}16
Am I not calling runModalSession correctly? I'm passing in an
NSModalSession type. I've checked and made sure that GNUStep didn't change
the signature of this function from MacOS. What else would it mean be?