HDTenEightyP/NetNews huggingface dataset:
From: sam_s@NeXT.com (Sam Streeper)
Newsgroups: comp.sys.next.programmer
Subject: Re: What happened to "instance drawing"
Date: 11 Sep 92 21:58:55 GMT
Reply-To: sam_s@NeXT.com

jgg@proforma.com (J. G. Gregory) writes:
> Way back when, there was this feature called "instance drawing".  It was  
> documented in the Concepts docs, as well as the function docs.  Now I can't  
> seem to find a description of it, except for the function definitions.  I  

When you use a buffered window, all your drawing goes to the buffer and
isn't immediately visible.  You make it visible by doing a flushWindow,
which copies the changed bits in the buffer to the visible areas of the
screen.

When you turn on instance drawing, you draw directly onto your window's
area on the screen, and the drawing never touches the buffer, so it doesn't
get saved.  It can be used for temporary drawing or animation, but since  
there's no buffering you see the erasures happening and it tends to look
flickery (and to my eye, cheesy and unprofessional)

The basic algorithm looks like this:

PSsetinstance(YES);
while (temporaryAnimation) {
	PSnewinstance();	// erase old instance drawing
	[self drawSomething];	// draw temporary stuff
	}
PSsetinstance(NO);

I suggest you avoid instance drawing, and instead look at Draw or
ScrollDoodScroll's NiftyMatrix to see how to do double buffered animations.

-sam
ps I noticed last night that NiftyMatrix has an error that causes it to cache
its browser incorrectly.  The solution is to remove the call to
convertFromSuperview.

--
Opinions expressed herein are not those of my employer.  They're not even
mine.  They're probably wrong besides.  How did they get in here, anyway?
Newsgroups: comp.sys.next.programmer
From: mferris@trirex.com (Mike Ferris)
Subject: Re:  PSsetfont
Organization: Trirex Systems Inc.
Date: Tue, 15 Sep 1992 19:50:06 GMT

Matthew Dillon writes
>In article <1992Sep12.224836.17946@next.cambridge.ma.us>  
simsong@next.cambridge.ma.us (Simson L. Garfinkel) writes:
>>Don't use the PS wraps for fonts; use the Font class.  It's  much  
faster.
>>
>>	id	aFont = [Font newFont:"Times-Roman" size:12.0];
>>
>>	[aFont set];
>>	PSmoveto(323,321)
>>	PSshow("foobar");
>>
>>to change the size, use:
>>
>>	aFont = [Font newFont:[aFont name] size:aNewSize];
>
>    Don't you want to free the old aFont ?
>
>					-Matt
>
>--
>
>    Matthew Dillon		dillon@Overload.Berkeley.CA.US
>    1005 Apollo Way		uunet.uu.net!overload!dillon
>    Incline Village, NV. 89451	ham: KC6LVW (no mail drop)
>    USA 			Sandel-Avery Engineering (702)831-8000

DON'T free Font objects.  Notice the "newFont" instead of "initFont"  
method.  Fonts are shared.  If you ask for a Times-Roman 12 point font  
again, you'll get the original aFont.

--
Mike Ferris
Trirex Systems, Inc.
mferris@trirex.com
Newsgroups: comp.sys.next.programmer
From: istewart@pyrian.com
Subject: SQL for $99
Organization: Pyrian, San Fran, CA, USA
Date: Sun, 6 Sep 1992 01:23:29 GMT

I am looking for the so called SQL Server on the Internet for $99. If someone  
could mail it to me, upload it to the purdue server (I only have mail access  
not ftp yet) or anything else, I would appreciate it.

Ian
-- 
Ian H. Stewart                      |  voice/fax 415-664-1170
Pyrian Software Group               |  CIS  71101,1260
Always looking for new SW to market |  Net  istewart@pyrian.com
NeXT,Mac,PC & Sun		    | Isn't LiFE more like RiSK?
Newsgroups: comp.sys.next.programmer
From: ronchet@itnsg1.cineca.it (Marco Ronchetti)
Subject: performRemoteMethod does not work. What's wrong?
Keywords: performRemoteMethod speaker
Organization: Laboratorio di Fisica Computazionale, INFM. Trento Italia
Date: Sun, 6 Sep 1992 12:08:27 GMT

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;
}

Newsgroups: comp.sys.next.programmer
From: mauriti@cs.tu-berlin.de (Frank Hartlep)
Subject: comp.unix.programmer
Organization: Technical University of Berlin, Germany
Date: Tue, 8 Sep 1992 14:07:12 GMT

(Excuses if this message appears repeatedly but my newsreader isn't
getting my first two postings.)

... although they do on a NeXT.
Perhaps somebody can see an error in this code.

                .
                .
                .

        BufferSize += 50000;
        Buffer = malloc (BufferSize);
        Offset = strlen (ARCHIVED) + strlen (Description) + 1 + 4;
        sprintf (Buffer, ARCHIVED "%s", Description);
        xdrmem_create (&Stream, Buffer + Offset, BufferSize - Offset, XDR_ENCODE);
                .
                . 
                .
        (in another function)
        if (Stream->x_op == XDR_ENCODE) {
                if (*Pointer != NULL) {
                        if (! xdr_bool (Stream, &NonNil))   <=== Bus error
                                return -1;
                        Next = 0;
                        if (DescriptionLoop (
                                Stream, Description, Descriptor, Pointer, &Next)
                            == -1)
                                return -1;
                }
                .
                .
                .

Some more info:
1.      The xdr_bool does the first write to the XDR stream, so it's very
        probable that something's wrong with the stream.
2.      The malloc for Buffer was ok, there should be enough memory for
        the stream.
3.      The Stream and NonNil variables seem to be ok, too.

I'm totally clueless. The routines have been heavily used on a NeXT without
any problem, but on a Sun4 (and IPX) they never make it beyond that point.

Any ideas are greatly apreciated.


Frank
From: simsong@next.cambridge.ma.us (Simson L. Garfinkel)
Newsgroups: comp.sys.next.programmer
Subject: Re: setting a button key to be ESC
Date: 7 Sep 92 15:05:48 GMT
Reply-To: simsong@next.cambridge.ma.us
Organization: Simson Garfinkel and Associates, Inc.

In article <Bu68tK.37L@cs.psu.edu> grio@colossus.cs.psu.edu (Daniel L Grillo)  
writes:
> I should have been more explict.  A button in a _Panel_ can have a key
> equivalent that is not a command key.   Keys like "d" and "." work fine.
> I was hoping there was a way to use ESC, without subclassing Panel.
> 
> 

What makes you think this?  NeXT's Calculator demo?  Their Panel subclass turns  
all keypresses into Command keypresses.
-- 

................................................................simson
From: simsong@next.cambridge.ma.us (Simson L. Garfinkel)
Newsgroups: comp.sys.next.programmer
Subject: Re: mthreads (trn) KILLS NeXTStep big time
Date: 11 Sep 92 14:07:05 GMT
Reply-To: simsong@next.cambridge.ma.us
Organization: Simson Garfinkel and Associates, Inc.

sounds like you have a flakey memory chip.  Does this happen on other  
computers?

In article <1992Sep10.180708.13581@cs.mcgill.ca> storm@uriel (Marc  
WANDSCHNEIDER) writes:
> 
> 
> For some reason, when I run the Mthreads program to set up the thread files
> for all my newsgroups, my next generates an Exception 15 (Uninitialized
> Interrupt says the 020 manual) and causes a complete panic and system
> reboot.
> 
> 
> It works for quite a while, but dies after a pile of groups no matter
> what I tell it to thread.
> 
> Compiling with the -g flag and running it through gdb produces, of course,
> the same.
> 
> Any ideas on what's going down here?
> 
> 
> Thanks
> 
> Toodlepip!
> 
> storm@uriel.cs.mcgill.ca
> 
> -- 
>   storm@cs.mcgill.ca           McGill University         C program run.  Run  
>   Marc Wandschneider           Montreal, CANADA          Program run! PLEASE!
>       "When 900 years old you reach, look as good you will not." - Yoda
> 				"Ow!" -J.F.K.~


--

................................................................simson

-- 

................................................................simson
Newsgroups: comp.sys.next.programmer
From: miron@extropia.wimsey.bc.ca (Miron Cuperman)
Subject: Re: 3.0 gdb does not work? (Oh yes it does!)
Keywords: gdb
Organization: Immortal Freedom's Deck
Date: Tue, 15 Sep 1992 05:14:54 GMT

oneill@cs.sfu.ca (Richard O'Neill) writes:

>Miron Cuperman <miron@extropia.wimsey.bc.ca> writes:
>>When I try to run gdb, it fails to even create the child process.
>>For example, trying gdb on /bin/cat:

>Well, I took your example and tried it myself on my NS 3.0 (release) machine
>and it worked fine...

I've found that if the stack limit is set to a power of two (like 8192)
gdb works fine.  gdb stops working if you set the stack limit to something
like 10000 ("limit stacksize 10000").  Interesting.
-- 
	Miron Cuperman <miron@extropia.wimsey.bc.ca>	(NeXTmail ok)
		       <miron@cs.sfu.ca>
	AMIX: MCuperman

ImmortalCyberComputingLaissezfaire
From: cc100aa@xray.gatech.edu (Ray Spalding)
Newsgroups: comp.sys.next.programmer
Subject: Re: how to scroll a view on demand?
Keywords: scroll, IB
Date: 10 Sep 92 21:30:17 GMT
Organization: Georgia Institute of Technology

In article <1992Sep10.070945.13964@urz.unibas.ch> frank@ifi.unibas.ch writes:
>How do I tell the scrollview (per software) to scroll to the top of the view?

	id clipview;
	NXPoint pt;
	
	pt.x = pt.y = 0;	// assumes flipped coordinates (0 at top)
	clipview = [[scrollview docView] superview];
	[clipview rawScroll:&pt];
	[scrollview reflectScroll:clipview];

-- 
Ray Spalding, Office of Information Technology
Georgia Institute of Technology, Atlanta Georgia, 30332-0715
Internet: ray.spalding@oit.gatech.edu (NeXT Mail accepted)
From: kjartan@kurosawa.cica.fr (Kjartan Emilsson)
Newsgroups: comp.sys.next.programmer
Subject: Object size and limits
Keywords: objects,limits
Date: 9 Sep 92 13:29:31 GMT
Reply-To: kjartan@kurosawa.cica.fr

Hi!
Here are a few questions I would be interested in knowing the answers to,  
if somebody knows them:

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  
instances of objects and to the number of loaded classes in a program  
besides simple memory limitations ?

Is there any bottleneck in the run-time system when the number of  
instances/classes increases ?

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

Thanks,

-Kjartan
Newsgroups: comp.sys.next.programmer
Subject: Re: setting a button key to be ESC
From: scott@nic.gac.edu (Scott Hess)
Date: 7 Sep 92 16:05:40
Organization: Gustavus Adolphus College
In-reply-to: simsong@next.cambridge.ma.us's message of 7 Sep 92 15:05:48 GMTLines: 21

In article <1992Sep7.150548.8473@next.cambridge.ma.us>
	simsong@next.cambridge.ma.us (Simson L. Garfinkel) writes:
>In article <Bu68tK.37L@cs.psu.edu>
>	grio@colossus.cs.psu.edu (Daniel L Grillo) writes:
>> I should have been more explict.  A button in a _Panel_ can have a key
>> equivalent that is not a command key.   Keys like "d" and "." work fine.
>> I was hoping there was a way to use ESC, without subclassing Panel.
>
>What makes you think this?  NeXT's Calculator demo?  Their Panel
>subclass turns all keypresses into Command keypresses.

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.]

Later,
--
scott hess <shess@ssesco.com>  <Who achieved programmer nirvana on Aug 11th>
12901 Upton Avenue South, #326  Burnsville, MN 55337 (612) 895-1208 Anytime!
   <Text: One Class to bring them all and in the darkness bind them ...>
Newsgroups: comp.sys.next.programmer
From: howard@monitor.com (Howard Brenner)
Subject: Re: Make bug?
Reply-To: howard@monitor.com (Howard Brenner)
Organization: Monitor Company / IE
Date: Mon, 14 Sep 1992 13:20:10 GMT

Julie Zelenski writes
> In article <BuF2u0.EIC@monitor.com> howard@monitor.com (Howard Brenner)  
> writes:
> I can't watch innocent source files get eaten without wanting to help  
out.   
> Here's the text from NextAnswers.736.   Be sure to put the PRECIOUS  
target  
> in the *postamble* (SRCFILES isn't defined til after Makefile gets  
> processed)
> 
> Julie Zelenski
> Developer Support
> 
> make removes files
> 
> Q:  Every now and then, if I use control-c to interrupt a make(1), it  
> decides to remove one of  my files.  I admit that my code isn't always  
the  
> cleanest, but is my computer trying to tell me something?  Is there a  
cure  
> for this? 
> 
> A:  There is a bug in make where it sometimes removes a source file  
> instead of the target when interrupted.  Here is a script of one of  
those  
> nasty interchanges between you and make:
> 
> hostname> make debug
> ^C*** `File.m' removed
> *** Exit 2
> Stop.
> 
> hostname> make debug
> Make:  Don't know how to make File.m.  Stop.
> *** Exit 1
> Stop.
> 
> As a workaround, you can add the .PRECIOUS pseudo-target in your  
> Makefile.postamble to protect yourself from this unwanted deletion.   
(See  
> below for more about .PRECIOUS)  It should depend on SRCFILES (which  
> covers CFILES, MFILES, HFILES, nibs, tiffs, etc).
> #
> #  Make sure we don't remove anything by accident if 
> #  interrupted at the wrong time.
> #
> PRECIOUS : $(SRCFILES)
> 
> 
> 
> About .PRECIOUS
> 
> make normally stops if any command it generates returns a non-zero exit  
> code.  Before quitting, however, it removes the current target it is  
> making.  The assumption here is that target is probably in a partly  
> finished state.  If it were left in place, it would show as up-to-date  
in  
> subsequent invocations of make, due to its now-revised date of last  
> modification.  
> 
> There may be occasions when you do not want the target removed upon  
> occurrence of errors.  The .PRECIOUS: pseudo-target allows you to  
specify  
> any file you do not want destroyed.  For example., the description fie  
> entry
> 	.PRECIOUS : target1 target2 target3
> prevents any of the three named targets from being removed by make.   
This  
> entry can occur anywhere in the description file.
> 
> QA736
> 
> Valid for 1.0
> Valid for 2.0
> 

Thanks for all the help and responses I have received.  The command is now  
in my Makefile.postamble!
Newsgroups: comp.sys.next.programmer
From: byer@adobe.com (Scott Byer)
Subject: Re: NeXT Step 3.0 and PostScript  problems!!!!! (maybe I should get a Mac?)
Reply-To: byer@adobe.com (Scott Byer)
Organization: Adobe Systems Incorporated
Date: Thu, 10 Sep 1992 17:00:46 GMT

Gottfried Mayer-Kress writes

> 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...

This is an application level problem.  Because of the lower resolution
of the screen, Display PostScript is doing it's best to show the image
as the application asks it to.  If the application asks it to display
a point and a line very close together, they may not show up on the
screen as different points, but they may be far enough apart that the
increased resolution of the printer shows the gap.

Your application needs to have some concept of 'snap' - snap-to-point,
or snap-to-line.  I don't know Create or Draw, but Illustrator has
just such a feature.  By using guides and the snap-to-point feature,
you are guarunteed that two point that claim to be aligned are aligned.

A temporary solution for many programs is to zoom up the maximum amount
and check alignment.  Usually this extra zoom factor will give you
the extra alignment you need, and hide the differences at low (300dpi)
printer resolutions.

Remember, screens have such a pitiful resolution, that it's *impossible*
to get *exactly* WYSIWYG.  The PostScript philosophy is to do the
closest approximation to the mathematical ideal possible given the
limits of the displaying device.

Display PostScript allows applications to be device independant, not
device ignorant.

--
Scott Byer                             NeXTMail: byer@mv.us.adobe.com
Adobe Systems Incorporated               These are *my* opinions, and  
1585 Charleston Road, P.O. Box 7900        do not necessarily reflect
Mountain View, CA 94039-7900             the opinions of my employer.
---------------------------------------------------------------------
Newsgroups: comp.sys.next.programmer
From: grio@colossus.cs.psu.edu (Daniel L Grillo)
Subject: Re: setting a button key to be ESC
Organization: Penn State Computer Science
Date: Sun, 6 Sep 1992 19:29:43 GMT

In article <1992Sep6.145546.7044@next.cambridge.ma.us> simsong@next.cambridge.ma.us writes:
>In article <Bu33xu.7x3@cs.psu.edu> grio@postscript.cs.psu.edu (Daniel L Grillo)  
>writes:
>> 
>> In the IB inspector, I'd like to set a button's key equivalent to be ESC.
>> I can't get it to work.
>> 
>
>Since key equivalents can only be command keys, and not the ESC key, you're out  
>of luck, unless you want the button to be command-ESC.
>
>You could subclass the Window object, override the keyDown: method, and turn  
>ESC into some command- key.

I should have been more explict.  A button in a _Panel_ can have a key
equivalent that is not a command key.   Keys like "d" and "." work fine.
I was hoping there was a way to use ESC, without subclassing Panel.


			--Dan
-- 
 Dan Grillo   grio@cs.psu.edu   [NeXTmail, PrivateMail, MIME welcome]
Newsgroups: comp.sys.next.programmer
From: louie@sayshell.umd.edu (Louis A. Mamakos)
Subject: Re: TCP reliability on NeXT
Organization: University of Maryland, College Park
Date: Sat, 5 Sep 1992 13:57:47 GMT

In article <1992Sep4.163219.1@hei.unige.ch> droux@hei.unige.ch writes:
>
>TCP/IP BERKELEY SOCKETS: Transmission problems with doublicated packets
>-----------------------------------------------------------------------

You omitted the most interesting code of call: that which does read() and
write().

>The data exchange is made by normal read() and write() calls followed by an 
>acknowledgement. We transmitt packets of 5000 bytes of unstructered data.
>If a sender send 300 packets (as a concrete example) the receiver receives
>over 400 packets and about 120 of them are invalid. We consider this as a
>serious problem since our system is based on realibility of TCP sockets.
>Is there a special option on sockets or another method to avoid these
>problems?

You are mistaken if you believe that TCP maintains any record
boundaries when you preform a write() or read() system call.  It does
not.  It is a stream protocol.  When you perform a read() system call,
it will return to you the number of octets of data returned to you
which may be different than the size of your buffer.  Thus, of the
sending application writes 5000 bytes and the receiving application
does a series of reads, it could return 3000 bytes on one read
followed by 2000 bytes on a subsequent one.

I am aware of no bugs in this area relating to TCP and the reliablity
of the data being transmitted.

>Special Comments:
>1. If the server and the client are running on the same computer, the problem
>   does not occur.

Of course it will act differently, as everything is effectively happening
synchronously since you are never leaving the machine.

>2. If the NeXT (receiver client) is swapping the number of faulty packets is
>   increasing.

Again, probably timing related.

>3. The number of faulty packets is somehow depending on their size.

How do you know the "packet" are faulty?  Remember, the user interface
to TCP has no notion at all of "packets", just streams of data.  It is
very similar to a tty-type device in that respect.

>We would be very happy about some information as our application is part
>of our graduation thesis.

You should investigate a very good book: "UNIX Network Programming" by
Stevens.  It covers this material quite well.

louie

Newsgroups: comp.sys.next.programmer
From: reggie@milton.u.washington.edu (Reginald Perry)
Subject: How to use ScrollView?
Summary: How do I handle large docViews?
Keywords: scrollview scrolling draw drawself
Organization: University of Washington
Date: Mon, 14 Sep 1992 19:47:22 GMT

>In article <1992Sep10.070945.13964@urz.unibas.ch> frank@ifi.unibas.ch writes:
>>How do I tell the scrollview (per software) to scroll to the top of the view?

>	id clipview;
>	NXPoint pt;
>	
>	pt.x = pt.y = 0;	// assumes flipped coordinates (0 at top)
>	clipview = [[scrollview docView] superview];
>	[clipview rawScroll:&pt];
>	[scrollview reflectScroll:clipview];

>-- 
>Ray Spalding, Office of Information Technology
>Georgia Institute of Technology, Atlanta Georgia, 30332-0715
>Internet: ray.spalding@oit.gatech.edu (NeXT Mail accepted)


	In a similar vein, I would like to be able to scroll my view.
The problem I am having is that the docView is bigger than the
possible visible view. I get the visible rectangle and draw in it, but
when I call display: I get logged off! I was wondering were there any
good examples of drawself routines that are integrated in a
ScrollView. Thanks for the help.


						Reggie


Newsgroups: comp.sys.next.programmer