[comp.sys.atari.st] Gem messages

mtp@ukc.ac.uk (M.T.Paley) (10/21/89)

Hello,
	Has anyone ever managed to send a message to a desk accessory in GEM?
It always bombs out whenever I send a message to any but the process that is
sending the message ( the ap_id returned by appl_open() ).

   E.G.
		:
	ap_wid = appl_find("MYACC   ");			/* This bit works */
	gets(message);					/* Unimportant */
	appl_write(ap_wid,strlen(message),message);	/* This crashes */
		:

However if appl_find is given the name of the current process then this
code works fine.

It is not the desk accessory that is at fault as it works perfectly with system
messages sent by the AES.

Anyone tried anything similar at any time?

Any information would be appreciated, probably replying by e-mail would be
best to avoid boring everyone!

	Much appreciated:
				Matthew

********************************************************************************
Janet: mtp@uk.ac.ukc
       phg445@uk.ac.ukc.saturn@uk.ac.ukc

jg@hpldola.HP.COM (Joe Gilray) (10/25/89)

>Any information would be appreciated, probably replying by e-mail would be
>best to avoid boring everyone!

No, please respond here!  This kind of discussion is PERFECT for this group.
(And besides I have a related question :-)

I don't know the answer to the original question, but I have one that may
provide a pointer to the answer.

What goes into message[1]?

Is it ap_wid?  What does it do (I've never used message[1] for anything)?

-Joe Gilray

dnewton@carroll1.UUCP (Dave 'C is cool, but what about LOGO?' Newton) (10/27/89)

In article <11830060@hpldola.HP.COM> jg@hpldola.HP.COM (Joe Gilray) writes:
>What goes into message[1]?
>Is it ap_wid?  What does it do (I've never used message[1] for anything)?

   message[1] is the ap_id of the application that originated the message.
I'm not sure what you could do with it, except maybe check to see if you got
a message from another application.  Maybe you could use this to throw up a
dialog box if you used a DA or something, just to confuse people.

-- 
David L. Newton       | uunet!marque!carroll1!dnewton  | The Raging Apostle-- 
(414) 524-7343 (work) |    dnewton@carroll1.cc.edu     | for the future--
(414) 524-6809 (home) | 100 NE Ave, Waukesha WI 53186  | for the world.
"Isn't it fun to take two unrelated sentences and mix the batter lightly?" -me