Re: Adding custom inputs to NSRunLoop
Re: Adding custom inputs to NSRunLoop
- Subject: Re: Adding custom inputs to NSRunLoop
- From: Malte Tancred <email@hidden>
- Date: Wed, 26 Sep 2001 12:58:57 +0200
Yes, but how do I implement a port? I can't find
anything in the API that allows your own port subclass
to report it's status to the run loop nor get a slice
of the loop.
Perhaps it's my picture of what a run loop is that's
scewed, but as I understand, each cycle of the run
loop involves checking the states of it's input sources.
If they're 'ready' they're 'fired'; an NSTimer invokes its
action and an NSPort sends its delegate is sent the
appropriate -handleMachMessage: or -handlePortMessage:
message.
My perception of the run loop is that it to some
degree resembles the concept of the select() system
call, with goodies added.
So, if I want to implement a subclass to NSPort, is there
a message sent from the run loop telling my port to
handle the input?
Cheerio,
Malte
Ondra:
Malte,
Malte Tancred (MT) wrote at Wed, 26 Sep 2001 11:25:02 +0200:
MT> How do I add a custom input source to NSRunLoop? NSRunLoop
MT> only supports NSPorts and NSTimers, as far as I can see.
Perhaps my imagination is flawed, but somewhat I can't imagine another
possible source of events? If it's internal, it's a timer; if it's
external,
it's a port?
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
--
Malte Tancred
Computer programmer, Oops AB, Sweden
mailto:email@hidden
http://www.oops.se/