🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #781

performRemoteMethod does not work. What's wrong?

#781
From: Marco Ronchetti
Date: Sun, 06 Sep 1992 12:08
33 lines
1636 bytes
I'm trying to pass commands to WriteNow. The ultimate goal is to build a file of addresses and infos with a Database, and then merge the info in a wn document.
I'd like to do it from my program, without requiring the user to actually 
using WriteNow and giving the merge command.

As a first step, I try opening a file with WriteNow (easy, it works). Then
I try passing a simple method with performRemoteMethod. I tried something
like "quit", "hide", "selectAll". (I verified that those methods do exist by
using NibEditor on WriteNow). Well, nothing happens, although I get a return
code = 0, which should mean that everything was fine...

What do I do wrong? 

Thanks
	Marco Ronchetti
	
===== here is my code:

- doIt:sender
{
	port_t thePort;
	int result, flag;	
	id targetApp;
	
	thePort = NXPortFromName("WriteNow",NULL);
	targetApp = [NXApp appSpeaker];
	[targetApp setSendPort:thePort];
	result = [targetApp sendOpenFileMsg:"/users/ronchet/Speaker/wd.wn"
	          ok:&flag andDeactivateSelf:NO];
	printf("open : %d %d\n", result, flag);
	result = [targetApp performRemoteMethod:"quit"];
	printf("quit : %d\n", result);
    return self;
}
Technical Details
Message-ID: <1992Sep6.120827.22094@itnsg1.cineca.it>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!rpi!ghost.dsi.unimi.it!itnsg1.cineca.it!ronchet

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!rpi!ghost.dsi.unimi.it!itnsg1.cineca.it!ronchet
From: ronchet@itnsg1.cineca.it (Marco Ronchetti)
Subject: performRemoteMethod does not work. What's wrong?
Message-ID: <1992Sep6.120827.22094@itnsg1.cineca.it>
Keywords: performRemoteMethod speaker
Organization: Laboratorio di Fisica Computazionale, INFM. Trento Italia
Date: Sun, 6 Sep 1992 12:08:27 GMT
Lines: 34