Thread View: comp.sys.next.programmer
2 messages
2 total messages
Started by Alex D. Nghiem
Tue, 18 Aug 1992 14:34
messaging mail in 3.0 with distributed objects -- you can't!
Author: Alex D. Nghiem
Date: Tue, 18 Aug 1992 14:34
Date: Tue, 18 Aug 1992 14:34
101 lines
3780 bytes
3780 bytes
Hello there:
Several weeks ago, I posted a message asking for help on how to message mail
using remote objects. This is the only concrete response I got (Thanks,
William!):
================================================================
Begin forwarded message:
From: William Shipley <wjs@blorf.cpac.washington.edu>
Date: Tue, 18 Aug 92 01:34:22 -0700
To: Alex D. Nghiem <alex@pencom.com>
Subject: Re: sending remote messages to mail in 3.0
Speaker/Listener and Distributed Objects are separate paradigms. While one
would hope that everyone using the former would update to the latter, this
isn't always the case.
Specifically, it appears Mail in 3.0 doesn't implement distributed objects.
Stupid, yes, but then again there's lots to complain about in Mail.
So, you're stuck using Speaker/Listener, apparently.
-W
=============================================================
For those that are interested, the following code was posted by Andy Stone
several weeks earlier:
Here's the new, perhaps undocumented, API for Mail:
Mail.msg:
- openSend;
- setTo:(char *)toField;
- setSubject:(char *)subjectField;
- setCc:(char *) ccField;
- setBody:(char *) bodyField;
- deliver;
-openSend:(int *)sender;
-setTo : (char *) toField inWindow:(int)sender;
-setSubject : (char *) subjectField inWindow:(int)sender;
-setCc : (char *) ccField inWindow:(int)sender;
-setBody : (char *) bodyField inWindow:(int)sender;
-deliver:(int)sender;
Note you can now get the id of the newly created window, which will
prevent the "overwrite of an existing window" bug which everyone was
alternately blaming Jayson, me, or a dozen others who snarfed that
undocumented, unpublished hack to send to Mail.
Include Mail.msg in your app, and it will create the MailListener and
MailSpeaker h and m files.
Here's a sample calling for 3.0PR2 or greater:
- sendMailTo:(const char *)to subject:(const char *)subject body:(const
char*)body
{
port_t mail;
id speaker;
int theWin;
speaker = [MailSpeaker new];
mail = NXPortFromName("MailSendDemo", ""); // ACK for now it works
[speaker setSendPort:mail];
[speaker openSend:&theWin];
if (subject)[speaker setSubject:(char *)subject inWindow:theWin];
if (to)[speaker setTo:(char *)to inWindow:theWin];
if (body)[speaker setBody:(char *)body inWindow:theWin];
[speaker free];
return self;
}
andrew
--
||<<-->>||<<==>>||<<++>>||<<??>>||<<++>>||<<-->>||<<==>>||<<++>>||
!! Andrew Stone !! (505) 345-4800 !!
!! andrew@stone.com <> Stone Design Corp !!
||<<-->>||<<==>>||<<++>>||<<??>>||<<++>>||<<-->>||<<==>>||<<++>>||
Thanks to both William and Andy for their help.
Best regards,
Alex Duong Nghiem Phone: (512) 343-1111
Pencom Software Fax: (512) 343-9650
9050 Capital of TX Hwy N. Mail: alex@pencom.com
Suite 300 Mail: co-Xist_support@pencom.com
Austin, TX 78759 Mail: co-Xist_info@pencom.com
USA
****************************
* NeXTMail gladly accepted *
****************************
Re: messaging mail in 3.0 with distributed objects -- you can't!
Author: Frank Thomas
Date: Thu, 27 Aug 1992 10:31
Date: Thu, 27 Aug 1992 10:31
15 lines
1025 bytes
1025 bytes
In article <1992Aug18.143442.14079@pencom.com> alex@laos (Alex D. Nghiem)
writes:
> For those that are interested, the following code was posted by Andy
Stone
> several weeks earlier:
[stuff deleted]
> mail = NXPortFromName("MailSendDemo", ""); // ACK for now it works
[stuff deleted]
> andrew
I think it should be
mail = NXPortFromName("MailSendDemo", [NXApp hostName]);
because if you run a program with `redirected` WindowServer on a different
NeXT, your program would be started there instead of using your NeXT.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads