🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
3 messages
3 total messages Started by Hubert B. Hickman Thu, 08 Oct 1992 05:00
Need a MINIMAL app for a speaker
#1337
Author: Hubert B. Hickman
Date: Thu, 08 Oct 1992 05:00
39 lines
1360 bytes
I am attempting to write a simple program that uses speaker/listener.  This
little program does not need to be a full-scale applcation, but simply 
needs to be able to send some messages to a remote application.

My problem is that the port is never found.  As of now, all of the
code resides in the main.m file.  There is no need for a nib file 
since this little executable has no user interface.

Do I have to do somthing more to have a minimal "speaker"?

Thanks,

Hubert Hickman
hickman@cse.unl.edu
-----
#import <stdlib.h>
#import <appkit/appkit.h>
#import <sys/port.h>

void main(int argc, char *argv[]) {

	
 	port_t	websterPort;
	int scode,tcode,flag;

 	NXApp = [Application new];
	websterPort = NXPortFromName("Webster",NULL);
	if(websterPort == PORT_NULL) 
		{
		NXRunAlertPanel("Error",
			   			"Webster port not found, %s.\n",
						"OK",0,0,NXUserName());
		}
	
[munch rest of code]



---------
Re: Need a MINIMAL app for a speaker
#1413
Author: andrew
Date: Fri, 09 Oct 1992 20:40
13 lines
1017 bytes
In article <1992Oct8.050012.25265@unlinfo.unl.edu> hickman@cse.unl.edu (Hubert B. Hickman) writes:
[speaker code deleted]

Use 3.0's distributed objects.  Best thing since sliced bread.  Takes
all of the pain out of writing distributed or client/server apps.


andrew
-- 
andrew@cubetech.com     | "We shall not cease from exploration
Andrew Loewenstern      |  And the end of our exploring
Cube Technologies, Inc. |  Will be to arrive where we started
                        |  And know the place for the first time." -T.S. Eliot
Re: Need a MINIMAL app for a speaker
#1455
Author: Dave Griffiths
Date: Tue, 13 Oct 1992 21:43
45 lines
1807 bytes
In article <1992Oct8.050012.25265@unlinfo.unl.edu> hickman@cse.unl.edu (Hubert B. Hickman) writes:
>I am attempting to write a simple program that uses speaker/listener.  This
>little program does not need to be a full-scale applcation, but simply 
>needs to be able to send some messages to a remote application.
>
>My problem is that the port is never found.  As of now, all of the
>code resides in the main.m file.  There is no need for a nib file 
>since this little executable has no user interface.
>
>Do I have to do somthing more to have a minimal "speaker"?
>
>Thanks,
>
>Hubert Hickman
>hickman@cse.unl.edu
>-----
>#import <stdlib.h>
>#import <appkit/appkit.h>
>#import <sys/port.h>
>
>void main(int argc, char *argv[]) {
>
>	
> 	port_t	websterPort;
>	int scode,tcode,flag;
>
> 	NXApp = [Application new];
>	websterPort = NXPortFromName("Webster",NULL);
>	if(websterPort == PORT_NULL) 
>		{
>		NXRunAlertPanel("Error",
>			   			"Webster port not found, %s.\n",
>						"OK",0,0,NXUserName());
>		}
>	
>[munch rest of code]
>

You have to do an [NXApp run]. At this point various initializations take
place which allow the NXPortFromName to work. So either put all your code
into the "appDidInit" method of some class, or create a class which sends
your NXApp a "stop:" message which will break it out of [NXApp run] so you
can fall through to the rest of your code.

Dave Griffiths
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