HDTenEightyP/NetNews huggingface dataset:
From: prim!dave@germany.eu.net (Dave Griffiths)
Subject: Re: performRemoteMethod does not work. What's wrong?
Keywords: performRemoteMethod speaker
Organization: Primitive Software Ltd.
Date: Mon, 7 Sep 1992 02:35:04 GMT

In article <1992Sep6.120827.22094@itnsg1.cineca.it> ronchet@itnsg1.cineca.it (Marco Ronchetti) writes:
>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? 
>

A couple of things. First of all WriteNow's application object doesn't
respond to "quit"; you should have used "terminate:". More importantly,
WriteNow's listener does not respond to "terminate:" so it still wouldn't
work. You can't send arbitrary messages to an apps listener - for it to
work, the listener must be subclassed and methods added that expect the
message you're sending. The standard Listener class does however respond
to a limited set of remote messages, including "unhide" and "openFile:ok:"
(the latter is used by your _speaker's_ sendOpenFileMsg method which is
why that call worked OK).

Similar limitations apply to distributed objects in 3.0.

It's a real pity that you _can't_ send arbitrary messages to any object in
an app. It would be simple to implement and be incredibly useful for the
sort of things you're trying to do. Sort of like a built-in default API.
And with Objective-C all the pieces are in place to do it. But NeXT, for
reasons known only to themselves (lack of imagination?), don't seem to want
to let us do stuff like this. (Imagine if you could: people would rave about
how useful it was, how you could only do this sort of stuff on the NeXT with
Obj-C etc etc. ).

Finally, a plug for a program I wrote called CyberMan which will let you
write a script of events that you want passed to an application. What you
want to do with WriteNow is exactly the sort of thing CyberMan was designed
to handle. There is a copy on the archive sites, but beware: the only example
script supplied doesn't work! (bug in the script, not in the program). A new
much user-friendlier version should be out soon.

Dave Griffiths
Newsgroups: comp.sys.next.programmer
From: rob@hobbes.cuc.ab.CA (Rob Parkhill)
Subject: Can I change the size of the cursor?
Organization: The Ohio State University Department of Computer and Information Science
Date: Sun, 13 Sep 1992 06:15:43 GMT

Hi all:
	I'm using NXCursor to change the cursor to another shape  
(BigPencil.tiff).  The problem I'm having is that I can't seem to use  
a cursor any bigger than the standard arrow-pointer.  I want to have  
the cursor about 4 times that size!  Is there any way I can do this?
Please respond via e-mail.
	Thanks!
---
Rob Parkhill
rob@hobbes.cuc.ab.ca
(NeXTmail preferred!)
From: moose@svcdudes.com
Newsgroups: comp.sys.next.programmer
Subject: Re: PSsetfont
Date: 14 Sep 92 18:00:35 GMT
Reply-To: moose@svcdudes.com
Distribution: na
Organization: Software Ventures, Inc.

In article <1992Sep11.160744.2376@axion.bt.co.uk> agray@axion.bt.co.uk (Andy  
Gray) writes:
> Having a slight problem with PSsetfont and I can't find the answer on my  
system,
> can anyone help?

I'm going to assume you know about the Font object but don't want to use it for  
some reason.  Otherwise, ignore the rest.

> but would like to code it inline as
> 
> 	PSfindfont("Times-Roman");
> 	PSscalefont(12.0);
> 	PSsetfont(???);

I would recommend using PSselectfont instead as it is less postscript to send  
to the Window Server.

> 
> The last line is the one that causes me grief. I'm supposed to send it a
> reference, any clues?

After quickly going through the disassembly, we see that if we pass in 8, the  
following postscript is emitted

8 execuserobject setfont

If 9 is passed in

9 execuserobject setfont

is emitted.  So, I would say that you pass in the user object that your font  
is.  Since neither PSfindfont, nor PSscalefont create the user object, you  
probably have to do that manually.  Overall, quite a painful process when you  
can use either PSselectfont, or just make your own wrap.

--
Michael Rutman			|	moose@svcdudes.com
Cubist				|	makes me a NeXT programmer
Software Ventures		|	maker of MicroPhone Pro
#include <std.disclaimer>	|	really offensive political statement
Newsgroups: comp.sys.next.programmer
From: mauriti@cs.tu-berlin.de (Frank Hartlep)
Subject: Loading classes at run-time: How?
Organization: Technical University of Berlin, Germany
Date: Mon, 14 Sep 1992 13:04:18 GMT

I do not want to use the objc_{load,unload}Module routines because
of their FIFO behaviour. Just loading the class file with rld isn't
enough, my app still complains 'class MyClass not linked into application'.
I can only guess why it reacts like that: There's a hash table containing
the Class structures of all classes known to the app, and by trying
objc_getClass ("MyClass") I get the same error message. So I suppose I
have to insert MyClass into the table by hand. This can be done with
objc_addClass (). The only problem is that I can't find any way to
obtain the Class structure of MyClass, which I need as an argument for
objc_addClass (). Any ideas from where to get this little beast?


Frank
mauriti@cs.tu-berlin.de

Newsgroups: comp.sys.next.programmer
From: brad%raven@kakwa.ucs.ualberta.ca  (Brad Nelson)
Subject: Re: Defaults Database management
Date: Mon, 7 Sep 1992 15:44:05 GMT

In article <15314@umd5.umd.edu> matthews@oberon.umd.edu (Mike Matthews)  
writes:
>I've looked through the Next Developer files in Librarian 
>and have read the section on defaults, but I must be 
>extremely dense because I still can't figure this one out. 

That makes two of us.

>How can I flush the registration table of defaults to the 
>.NeXTdefaults database? NXWriteDefaultsVector() takes 
>what's in your vector and dumps it to the database and 
>puts the new values into the registration table. 
>
>I tried changing the vector information (a la strcpy) but 
>that gave an "invalid operands to binary +" error on 
>compile so there's something going on behind the scenes 
>that I don't grok too well. 

I think that's because the vector is static - it's supposed
to be the "default defaults".

[munch]

>It's gotta be simple. 
>
>Doesn't it? 

I must be dense too, I couldn't figure out a simple way to do
that.  The thing that confused me was that I assumed that
NXWriteDefaults() was simply a batched version of NXWriteDefault().
Bzzzt!  The two functions don't do the same thing at all.  I can't
imagine why NXWriteDefaults() even exists, given the way it works.
(It writes the vector to disk, not the table)

The values in your NXDefaultsVector will always be available to your
program as soon as you NXRegisterDefaults(), so why would you ever
want to write the _vector_ to the defaults database?  Wouldn't it
make more sense to have NXWriteDefaults() write the _table_ to the
database rather than the vector?  Or, better yet, NXWriteDefaults()
could go through the table and write only the values that are 
different from the ones in the vector.

I guess the thing that confused me was that the docs say "To 
maximize efficiency, you should use one call to NXWriteDefaults() 
rather than several calls to NXWriteDefault() to write multiple values." 
Sure, sure.  You use NXSetDefault() to update a value in the table,
then you call NXWriteDefaults() to write the vector to the database
and re-register, which overwrites the value you just NXSetDefault()ed
with the one in the vector.  

Can anyone explain why this stuff works the way it does?  Is there
an easy way to write the defaults in the _table_ out to the 
database, rather than NXWriteDefault()-ing them individually?

-Brad        brad%raven@kakwa.ucs.ualberta.ca

Newsgroups: comp.sys.next.programmer
From: slfields@essex.ecn.uoknor.edu (Scott Landon Fields)
Subject: 68040 Traps
Date: Tue, 15 Sep 1992 21:44:53 GMT
Organization: Engineering Computer Network, University of Oklahoma, Norman, OK, USA

I am working on a machine code independant application and I would like to
know the most efficient way to intercept the 68000 trap vectors, if 
possible. I don't currently have my machine going so I can't look in the
reference material. Anyway, I would appreciate any information.

Newsgroups: comp.sys.next.programmer
From: howard@monitor.com (Howard Brenner)
Subject: Make bug?
Reply-To: howard@monitor.com (Howard Brenner)
Organization: Monitor Company / IE
Date: Fri, 11 Sep 1992 13:58:47 GMT

This is rare, but it has happened to me twice.

In V2.1 of NeXTStep I was performing a make on my program when in the  
middle I realized I wanted to change a file.  I pressed CNTRL-C during the  
make and got the following message:
	<filename>.m removed

and sure enough my source file was gone!

Has anyone else run into this problem?
Newsgroups: comp.sys.next.programmer
From: cjb@canopus.Stanford.EDU (Cecil Bloch)
Subject: Re: Reading in .rtfd files
Reply-To: cjb@vega.stanford.edu
Organization: DSO, Stanford University
Date: Tue, 8 Sep 92 17:45:24 GMT

In article <BtyM8D.GEt@monitor.com> howard@monitor.com (Howard Brenner)  
writes:
> Does anyone know how to read in an .rtfd file (files produced by edit  
when  
> graphics are involved).  I tried loading in the TXT.rtf file in the  
rtfd  
> directory and it loaded in the text but not the graphics. 

(1) Look at the Text class documentation - "METHODS IMPLEMENTED BY AN  
EMBEDDED GRAPHIC OBJECT", towards the end of Text.rtf.

(2) Look at MiniExamples/ImageText, files GraphicImage.m and FileImage.m  
in particular.

Edit inserts a directive "NextGraphic" (I think) into a rich text file to  
signal the presence of an embedded graphic. Unless you have/write a custom  
cell or object that can respond to that, the quick-fix solution is to use  
the MiniExample App "ImageText" rather than Edit to embed the graphic in  
an rtf and then use GraphicImage.h/.m in your App. Remember also to  
register the directive, so the Text object knows where to go when it hits  
the embedded directive:
[Text registerDirective:"GraphicImage" forClass:[GraphicImage class]];

P.S. If anyone else out there knows a better way to handle this I too  
would appreciate some guidance...
Newsgroups: comp.sys.next.programmer
From: gmk@pegasos.ccsr.uiuc.edu (Gottfried Mayer-Kress)
Subject: NeXT Step 3.0 and PostScript  problems!!!!! (maybe I should get a Mac?)
Reply-To: gmk@pegasos.ccsr.uiuc.edu (Gottfried Mayer-Kress)
Organization: University of Illinois at Urbana
Date: Thu, 10 Sep 1992 05:25:19 GMT

Some time I got some advertising file about why NeXT is superior to Mac:
because NeXT is a PostScript based machine, and therefore you get on the 
printer "exactly" what you see on the screen, NOT!
I found this extremely frustrating when I tried to show off the new 
NextStep 3.0 with PostScript "Level 2" with some simple graphics:
I had a perfect alignment of some elements on the screen, when I printed
(even on the new, fancy color printer) I got a consistent offset of about 3mm,
a real *&%^&#$-pain in the neck. This happened both in Create and also in 
Appsoft Draw!! I really hope that I am just too dumb for PostScript and someone 
has a nice and simple solution to this problem...

BTW, the deadline for our project is Friday, 10:30a.m. ....
--
Gottfried Mayer-Kress
Center for Complex Systems Research, Department of Physics
3025 Beckman Institute, 405 N Mathews, Urbana, Il 61801
gmk@pegasos.ccsr.uiuc.edu (NeXT-Mail)
gmk@goshawk.lanl.gov, gmk@santafe.edu 
(217)-244-5877 (voice/fax modem),x8371(fax), x1994 (msg)
From: glenn@rightbrain.com (Glenn Reid)
Newsgroups: comp.sys.next.programmer
Subject: Re: Why is my PostScript text upside down? Help! Help!
Date: 10 Sep 92 06:27:45 GMT
Reply-To: glenn@rightbrain.com


> >   // add the text
> >   PSsetrgbcolor(1.0, 1.0, 1.0);
> >   PSmoveto(10.0,NX_HEIGHT(&aRect)-10.0);
> # ifdef GLEN_REID
> # define FONT_NAME      "Lithos-Bold"
> # else
> # define FONT_NAME      "Helvetica"
> # endif

Heh heh.  This is great, except that it won't compile correctly, because
you spelled my name with only one 'N' :-)  I like your font choice,
however!

I, of course, have modified my own /usr/include/appkit.h file to define

#define GLENN_REID 1

Just for such occasions :-)  (although there are those who would argue that
it should be 0).

--
 Glenn Reid        		NeXTmail: glenn@rightbrain.com
 RightBrain Software		415-326-2974 (NeXTfax 326-2977)
 Palo Alto, California
Newsgroups: comp.sys.next.programmer
From: howard@monitor.com (Howard Brenner)
Subject: Re: Reading in .rtfd files
Reply-To: howard@monitor.com (Howard Brenner)
Organization: Monitor Company / IE
Date: Thu, 10 Sep 1992 19:19:01 GMT

Cecil Bloch writes
> Which ButtonCell?  What are you loading the Rich Text into?
> Something else occurred to me -- if all you want to do is open the RTF  
> then the best thing might be to message the Workspace Manager to do it,  
in  
> which case Edit will be launched and the RTF opened:
> 
> [[NXApp appSpeaker]  
setSendPort:NXPortFromName(NX_WORKSPACEREQUEST,NULL)];
> result = [[NXApp appSpeaker] openFile:filename ok:&ok];
> 
> 

I actually did something pretty hacky.  I did a:
    [Text registerDirective:"NeXTGraphic" forClass:[GraphicCell class]];

Where GraphicCell is a subclass of ButtonCell.

In the GraphicCell class I implemented the readRichText:forView: method.   
I new that the three parameters following the NeXTGraphic command were the  
tiff image name, height and width.  I did and NXScanf to get the file name  
and using the path of the original RTFD file, i concatted the tiff image  
name and did an NXImage initFromFile and set the ButtonCell image to be  
that image.  Probably not the best way to implement it but it works for  
me.
From: fermat@fermat.dartmouth.edu (Michael Glenn)
Newsgroups: comp.sys.next.programmer
Subject: Re: AppInspector, ProcessMonitor, and MallocDebug problems.
Date: 14 Sep 92 01:41:34 GMT
Organization: Dartmouth College, Hanover, NH


Um, ignore that post about them not working.  I got them to work.  Missing  
file in /usr/lib.  Sorry to clog the airways...

fermat@fermat.dartmouth.edu
From: gbol@rglnext.geol.vt.edu (Gregory Lampshire)
Newsgroups: comp.sys.next.programmer
Subject: strange color PS problem....
Date: 8 Sep 92 23:22:06 GMT


	

I am attempting to view SAS generated color PS on a NeXTdimensions.   
Here's what happens:

If I use YAP the image is in color.
If I use Preview the image is in B&W but dithered for color (ie the
	colored lines look like greyscale--they look bad).
If I use Mme2.0 and preview a color plot, the previewer uses color.


The SAS PS file is pretty trashy, no comments anywhere.  Anybody have a  
clue as to why my SAS PS file only is in color in Yap and not in Preview?   
Is it just very poor PS on SAS's part? (the SAS color ps file is using the  
setrgbcolor command.  I can see them in the file).



--
Gregory Lampshire 
Virginia Tech 
Bradley Department of Electrical Engineering
gbol@rglnext.geol.vt.edu (NeXTmail welcome)
------------------------
My opinions are my very own and do not reflect the opinions of any  
employer
Newsgroups: comp.sys.next.programmer
Subject: Re: setting a button key to be ESC
From: feijai@endor.byu.edu (Sean Luke)
Date: 8 Sep 92 15:38:56 -0700
Reply-To: sean@digaudio.byu.edu

In article <SCOTT.92Sep7160540@nic.gac.edu>  writes:

>What gave it away to me is when I ran IB, pulled in a Panel, but
>a Button on it, made the Key for it a 'd', and then did a Run/Test.
>Pressing d caused the Button to flash, regardless of whether I had
>Command down or not.  [Really, try it, it works.]


Well, in *most* cases.  I just tried it with one of my programs that uses  
button-key presses (Resound), and got some strange results.  My  
button-keys are on the keypad, and the one with the  
tilde/back-apostrophe-thing...calls up the "underground" restart sequence  
when used with they command key.

Truly weird.  :)

--

Sean Luke
Brigham Young University                   MILK:  It Comes From Cows
sean@digaudio.byu.edu  
NeXTmail and nifty Mac stuff welcome
From: info@chromagrafx.com
Newsgroups: comp.sys.next.programmer
Subject: PixelMaster API publicly available
Date: 3 Sep 92 17:01:30 GMT
Reply-To: info@chromagrafx.com
Organization: Chromagrafx Imaging Systems, Hauppauge, NY



PixelMaster API Publicly Available
Beta Release 0.7 (Prerelease 1.0) - September 3rd, 1992


Chromagrafx Imaging Systems is about to release a beta version of our  
NeXTSTEP 3.0 image-editing application PixelMaster.  PixelMaster is a new,  
fully dynamic image editing application for the NeXT platform.  Its basic  
strengths lie behind a totally modular design concept and an efficient  
memory management scheme.  It is intended that developers can easily write  
modules such as tools, toolboxes, utilities, status bars, colorspace  
converters, and input and output drivers for this application, without  
having to worry about image administration.  Just write the module, and  
you're done.

The beta API for PixelMaster is now publicly available.  If you're  
interested in graphics applications on the NeXT platform and have (or will  
have) a 3.0 machine, we would be interested in hearing from you.  Please  
send mail to pm_info@chromagrafx.com to receive a copy of the API.  Let us  
know if you're NeXTmail capable.  Developers who ask for a copy of the API  
will receive priority choosing for the beta PixelMaster development  
package, due out in mid-October.

---

PixelMaster is a trademark of Adroit Technologies, Inc.  NeXT, the NeXT  
logo, and NeXTSTEP are trademarks of NeXT Computer, Inc.
Organization: Penn State University
Date: Wed, 9 Sep 1992 15:28:36 EDT
From: <MKK2@psuvm.psu.edu>
Newsgroups: comp.sys.next.programmer
Subject: Re: Object size and limits


In article <28935@sophia.inria.fr>, kjartan@kurosawa.cica.fr (Kjartan Emilsson)
says:

>How can you estimate the memory usage of an instance of an object in a
>program, beside using NXWriteObject and looking at the file size ? Is it
>the size of the declared instance variables plus method selectors, or are
>there some additional headers ? Are there any limits to the number of

As I understand it, instances are essentially structs, so sizeof
tells you pretty much what you want to know.  Yes, the code for
the methods and the selector tables require some overhead, but they
are not duplicated for each instance.

>I'm thinking of order of magnitudes like about 5000 instances of 500+
>classes/categories.

If you feel comfortable that your design really needs 500 classes, I don't
forsee any bottleneck.  5000 instances should be no problem.

Newsgroups: comp.sys.next.programmer
From: rwb@alexander.VI.RI.CMU.EDU (Robert Berger)
Subject: Allocating ports in kernel servers
Organization: School of Computer Science, Carnegie Mellon
Date: Wed, 9 Sep 1992 04:37:13 GMT


How do I allocate a port from within a kernel server? The documention
for hmap lists the following:

/* Create the port. */
r = port_allocate((task_t)task_self(), &port_name);

which can't possibly work, since task_self is not defined in the kernel.

I tried various combinations of current_task() and convert_task_to_port(),
none of which worked.

Could someone who has done this tell me how?
From: agray@axion.bt.co.uk (Andy Gray)
Newsgroups: comp.sys.next.programmer
Subject: PSsetfont
Date: 11 Sep 92 16:07:44 GMT
Organization: BT Laboratories

Having a slight problem with PSsetfont and I can't find the answer on my system,
can anyone help?

The raw PostScript required is

	/Times-Roman findfont 12 scalefont setfont

I can wrap this as

	defineps tm12()
		/Times-Roman findfont 12 scalefont setfont
	endps

but would like to code it inline as

	PSfindfont("Times-Roman");
	PSscalefont(12.0);
	PSsetfont(???);

The last line is the one that causes me grief. I'm supposed to send it a
reference, any clues?

Thanks

Andy Gray
From: drm@esl.com (Don McGregor )
Newsgroups: comp.sys.next.programmer
Subject: Re: Scrolly String thing.
Date: 14 Sep 92 21:36:12 GMT
Reply-To: drm@esl.com

In article <2AB381FD.20938@news.service.uci.edu>  
rmyers@dec5200.acs.uci.edu (Richard Myers) writes:
> When using IB to design menus, it's possible to grab one menu item
> and move it to a different 'slot'.  I'm looking for a similar thing
> for text in a 'view' or somesuch.
> 
Look in NeXTDeveloper/Examples/ScrollDoodScroll.  NiftyMatrix does
what you want.  You can control-drag cells to new locations in a matrix.

It occurs to me that this example should probably be rewritten for 3.0 to  
use the new dragging protocol.

--
Don McGregor
drm@esl.com
From: dimitri@dutiws.tudelft.nl (Dimitri Tischenko)
Newsgroups: comp.sys.next.programmer
Subject: DBKit without Oracle/Sybase?
Keywords: DBKit, adaptors
Date: 4 Sep 92 21:07:51 GMT
Organization: Delft University of Technology

Now NS3.0 is out, I'm allowed to ask this question:

We would like to experiment with DBKit. Unfortunately, we don't have Oracle 
or Sybase servers (we do have Ingres, but not on the NeXT). 
It is my understanding that there is no DBKit adaptor to a flat-file  
database available. Is there any possibility in examining the features
of DBKit without purchasing Oracle or Sybase?

Thanks in advance,

Dimitri
--
+------------------------------------------------------------------------------+
| Dimitri Tischenko | D.B.Tischenko@IS.TWI.TUDelft.NL |   NeXTmail preferred!  |
+---------------------------------------+--------------------------------------+
| Delft University of Technology        | Technische Universiteit Delft        |
| Fac Applied Math & Computer Science   | Fac. Techn. Wiskunde & Informatica   |
| The Netherlands                       | Nederland                            |
+---------------------------------------+--------------------------------------+
Newsgroups: comp.sys.next.programmer
From: howard@monitor.com (Howard Brenner)
Subject: Re: Reading in .rtfd files
Reply-To: howard@monitor.com (Howard Brenner)
Organization: Monitor Company / IE
Date: Tue, 8 Sep 1992 19:27:11 GMT

Cecil Bloch writes
> In article <BtyM8D.GEt@monitor.com> howard@monitor.com (Howard Brenner)  
> writes:
> > Does anyone know how to read in an .rtfd file (files produced by edit  
> when  
> > graphics are involved).  I tried loading in the TXT.rtf file in the  
> rtfd  
> > directory and it loaded in the text but not the graphics. 
> 
> (1) Look at the Text class documentation - "METHODS IMPLEMENTED BY AN  
> EMBEDDED GRAPHIC OBJECT", towards the end of Text.rtf.
> 
> (2) Look at MiniExamples/ImageText, files GraphicImage.m and FileImage.m  
> in particular.
> 
> Edit inserts a directive "NextGraphic" (I think) into a rich text file  
to  
> signal the presence of an embedded graphic. Unless you have/write a  
custom  
> cell or object that can respond to that, the quick-fix solution is to  
use  
> the MiniExample App "ImageText" rather than Edit to embed the graphic in  
> an rtf and then use GraphicImage.h/.m in your App. Remember also to  
> register the directive, so the Text object knows where to go when it  
hits  
> the embedded directive:
> [Text registerDirective:"GraphicImage" forClass:[GraphicImage class]];
> 
> P.S. If anyone else out there knows a better way to handle this I too  
> would appreciate some guidance...

I tried it out and it works (sort of).  I found that I had to disable the  
ButtonCell so I would not get a "Text does not recognize sendAction:to:"  
message.  I also noticed that some text around the ButtonCell turned grey  
when I scroll the text (odd).  But it does work.

I also noticed that V3.0 has a readRTFD: method for the Text object  
(doesn't much help with 2.X though)

thanks!