[comp.sys.amiga.tech] IDCMP LONELYMESSAGE

850347s@aucs.UUCP (Hume Smith) (11/13/88)

I'm trying to make a program that will start another task that adjusts
the screen colours (yes that seems a bit much to start another task for -
just trust me :-).  The point is: I need, of cpurse, to know when this
task ends; and I think the easy way would be to have it send a message.
And the easiest way to deal with that message would be through the IDCMP
of the main window - that way there's only one port to muck with.
But I'll need a message to send...
   There's a macro in the intuition/intuition.h header LONELYMESSAGE
in the MessageClass macro setion that isn't documented anywhere.
Was this provided for this sort of application? would it be safe
(portable/ no conflicts/ etc) to use it as a class and make up a code?
Or do you have a better suggestion that can be implemente in less
than 1000 :-) lines?

850347s@aucs.UUCP (Hume Smith) (11/13/88)

In article <1362@aucs.UUCP> 850347s@aucs.UUCP (Hume Smith) writes:
>   There's a macro in the intuition/intuition.h header LONELYMESSAGE
>in the MessageClass macro setion that isn't documented anywhere.
>Was this provided for this sort of application? would it be safe
>(portable/ no conflicts/ etc) to use it as a class and make up a code?
>Or do you have a better suggestion that can be implemente in less
>than 1000 :-) lines?

I figured out a neater way without any messages - but my question
remains in this form:

What can LONELYMESSAGE be used for?

rap@ardent.UUCP (Rob Peck) (11/16/88)

In article <1363@aucs.UUCP>, 850347s@aucs.UUCP (Hume Smith) writes:
>   There's a macro in the intuition/intuition.h header LONELYMESSAGE
>in the MessageClass macro setion that isn't documented anywhere.
> 
>What can LONELYMESSAGE be used for?

You don't get to use LONELYMESSAGE for anything.  Intuition sets this
class for any message that had, at one time, been sent to somebody's
IDCMP port and has been replied back to Intuition.  As things are
happening, Intuition dynamically allocates its event message packets.
Before it goes and allocates another one, it looks to see if its
own reply port has any previously created messages that it can
possibly reuse.  I don't recall exactly what the source code does,
since I no longer have access to it, but if I remember correctly,
the class is set to LONELYMESSAGE if it is not doing involved with
carrying anything useful.  It is simply part of Intuition's high-water
mark of previously allocated, but currently unused, message blocks
that are to be reused before any other allocations take place.

Probably should have been specified in "include/8^)/intuinternals.h",
instead of a published file.

Rob Peck

andy@cbmvax.UUCP (Andy Finkel) (11/17/88)

In article <719@ardent.UUCP> rap@ardent.UUCP (Rob Peck) writes:
>You don't get to use LONELYMESSAGE for anything.  Intuition sets this
>Probably should have been specified in "include/8^)/intuinternals.h",
>instead of a published file.
>
>Rob Peck

The reason its there is that through programmer error you can actually
get this message (I hate getting unknown IDCMP messages, don't you ?)

We should probably add a warning to the include files, like
"If you get one of these, your event loop has gone loopy".

-- 
andy finkel		{uunet|rutgers|amiga}!cbmvax!andy
Commodore-Amiga, Inc.

"Possibly this is a new usage of the word 'compatible' with which
 I was previously unfamiliar"

Any expressed opinions are mine; but feel free to share.
I disclaim all responsibilities, all shapes, all sizes, all colors.