HDTenEightyP/NetNews huggingface dataset:
From: cnh5730@maraba.tamu.edu (Charles Herrick)
Newsgroups: comp.sys.next.programmer
Subject: Re: -=?=- dumping text into an invisible text object -=?=-
Date: 10 Apr 92 18:31:16 GMT
Article-I.D.: tamsun.12163

Charles Herrick writes
> Bubalah's,
> I've got some email out on this, but it's driving me crazy so ...

well, so my good friend and mentor Scott Hess helped me fix my very bogus  
code, and here is some code that works. It allows you to print a section  
of text that you've selected in a Text object. Happy Hacking :-). 
By the way,

docView = [myScrollView docView];

BEGIN--CUT HERE--
- print:sender {
  // this works because of Scott Hess, bless him!!
  //  the MenuCell button with tag == 0 is the "Print All" menu button
	if (![[sender selectedCell] tag])
	  [docView printPSCode:self];
	else {
	    NXSelPt	start, end;
	    int		length;
	  [docView getSel:&start :&end];  
	  length = end.cp - start.cp;
	  if (length)	// something selected, print it {
	   id		invisibleWindow;
	    static id	textObject = nil;
	    NXStream	*stream;
	    NXRect	frameRect;
	    stream = NXOpenMemory(NULL,0,NX_READWRITE);
	    [docView writeRichText:stream from:start.cp to:end.cp];
	    [docView getFrame:&frameRect]; // gotta have a real frameRect
	    if (!textObject) {	
		// so it won't complain during lockFocus
	      invisibleWindow = [[Window alloc] init];	
	      textObject = [[[[Text alloc] 
	      			initFrame:&frameRect] 
				setMonoFont:NO] 
				setVertResizable:YES];
	      [[invisibleWindow contentView] addSubview:textObject];
	    }
	    else
	      [textObject setFrame:&frameRect];
	    NXSeek(stream, 0, NX_FROMSTART);	// rewind the stream
	    [textObject readRichText:stream];
	    NXClose(stream);
	    [textObject sizeToFit];		// adjust the frameRect
	    [textObject printPSCode:self];
	  }
	}
	return self;
}

END--CUT HERE--
From: chauvin@pencom.com (Chris Chauvin)
Newsgroups: comp.sys.next.programmer
Subject: Re: violent crashes
Date: 15 Apr 92 18:17:16 GMT
Reply-To: chauvin@pencom.com (Chris Chauvin)
Organization: Pencom Software

In article <1992Apr13.232753.25043@ucsu.Colorado.EDU>  
schildba@spot.Colorado.EDU (Wolfgang Schildbach) writes:
> Hi,
> 
> every once in a while it happens to me that upon executing my code
> the NeXT just kills *ALL* my processes, logs me out and leaves me
> with the login screen. My understanding of UNIX is that no matter
> how nasty a program, it should never infringe on other processes.
> 
> What could cause these nasty crashes?
> 
> Ciao W.

My guess is that your crashing the window server.  I think there are still  
nasty bugs in the window server code that can make it crash.  And, when it  
crashes it takes everything else with it.  Supposedly, there was some garbage  
collection problem in 2.0 that is fixed in 2.1, although I still see this kind  
of crash.  Also, one of our marketing people has seen FrameMaker and TopDraw  
make this violent crash happen.  It's impossible to predict or duplicate which  
makes it hard to submit a bug report of any consequence.

Sorry I couldn't be more help, but noone I've talked to seems to know anything  
about why the window server crashes randomly like that.  It would be really  
cool if someone at NeXT could comment on this since I've seen this happen in  
several Apps.  

Another awful thing about this kind of bug is that if your App is the one  
causing the crash, it's impossible to find out what you are sending to the  
window server that could be causing such a bug so that you could, at least,  
work around it.

If you do get any resolution on this, I'd be interested in hearing about it.

Chris Chauvin
chauvin@pencom.com
Pencom Software
(512) 343-1111
From: d1h1883@himalia.tamu.edu.tamu.edu (Dave Hess)
Newsgroups: comp.sys.next.programmer
Subject: Problem ending a cell edit in a Matrix
Date: 13 Apr 92 16:06:38 GMT
Reply-To: d1h1883@himalia.tamu.edu.tamu.edu
Followup-To: comp.sys.next.programmer
Organization: Texas A&M University


I've got a matrix full of TextFieldCells with some of them
editable/selectable and some of them not. When I go to reload the
Matrix with new values I get a redraw problem in the cell that is
currently being edited. All the other cells get redrawn fine, just the
one being edited is munged. I finally realized that I probably need to
end the editing before I update. I've tried selecting the cell at
(-1,-1) as suggested in the documentation but it produces no change.
The same cell is still being edited.

The Matrix is in track mode and I do have the cell background gray
set.  I've also tried setting the Matrix to allow an empty selection
which is only supposed to apply for radio mode with no luck.  I've
pored over the class references for quite a while and come up
clueless.

Anybody got suggestions or know what I'm missing?

Dave

----
David K. Hess
Graduate Student
Texas A&M University
dhess@cs.tamu.edu
From: hintz@gulliver.informatik.uni-dortmund.de (Stefan Hintz)
Newsgroups: comp.sys.next.programmer
Subject: JPEG in TIFF
Keywords: TIFF, JPEG
Date: 8 Apr 92 13:50:15 GMT
Organization: University of Dortmund, Germany

Hello,

I need a documention for reading and writing "JPEG in TIFF" files.
Source code for doing this, would also be nice.

Stefan Hintz

hintz@gulliver.informatik.uni-dortmund.de
From: simsong (Simson L. Garfinkel)
Newsgroups: comp.sys.next.programmer
Subject: Re: violent crashes
Date: 15 Apr 92 13:50:20 GMT
Reply-To: simsong@next.cambridge.ma.us
Organization: NeXTWORLD Magazine

In article <1992Apr13.232753.25043@ucsu.Colorado.EDU>  
schildba@spot.Colorado.EDU (Wolfgang Schildbach) writes:
> every once in a while it happens to me that upon executing my code
> the NeXT just kills *ALL* my processes, logs me out and leaves me
> with the login screen. My understanding of UNIX is that no matter
> how nasty a program, it should never infringe on other processes.
> 
> What could cause these nasty crashes?
> 
Kernel bug.
-- 

................................................................simson
Newsgroups: comp.sys.next.programmer,comp.os.mach
From: kocks@jessica.stanford.edu (Peter Kocks)
Subject: How do you ld code in mach so that the stdlib is overwritten? 
Summary: ld, mach, and overriding malloc
Keywords: malloc, mach, ld, unix
Organization: Academic Information Resources
Date: Mon, 13 Apr 92 16:12:24 GMT

Hi,

I'm try to port some malloc debugging tools for unix to NeXT/MACH (recently
posted to comp.sources.reviewed).  This may be futile, but I'm trying
anyway.  

The programs compile fine, but when I try to link I always get
messages like "malloc defined twice...exit".  On the NeXT there
already is a MallocDebug library which is used to override the
libsys_s.a version of malloc.   You simply add -lMallocDebug to your
command line and everything works fine.  I looked into the NeXT
MallocDebug library and discovered it was not a standard archive.
This leads me to conclude that they did not use the standard "ar"
"ranlib" when compling there library.  

So, how do you do it?  How do you make a library of object code such
that when loaded first, all subsequent loads of objects of the same
thing are ignored?  In unix this seems simple, in MACH not.

Please respond by e-mail
--Peter Kocks
  kocks@chemsitry.stanford.edu

P.S.
Incidently, the reason I am not using the NeXT provided MallocDebug
library is that it does not work as well as I would like with gdb.
I'm not programming NeXT applications so the MallocDebug application
is not the answer either.  The code I have seems like it will do a lot
and I will post if it works.
From: tuti@tutiki.toppoint.de (Torsten Buelck)
Newsgroups: comp.sys.next.programmer
Subject: Re: Linking a C program to Mathematica (ver. 1.2)
Date: 12 Apr 92 13:28:46 GMT
Reply-To: tuti@tutiki.toppoint.de (Torsten Buelck)
Organization: Tuti's... private UUCP-Site

In article <1992Apr8.132658.9582@msuinfo.cl.msu.edu>  
engelsma@golden.cps.msu.edu (Engelsma Jonathan) writes:
> I found a small tech report from wolfram in the manuals that came
> with our Sun version of mathematica that was quite useful.  It is
> entitled: Mathlink External Communication in Mathematica.   I 
> suppose you would need to contact Wolfram to get a copy.  Can 
> somebody listening comment on the availibility of this tech report?

Hi, there.

With my copy of Mathematica (NeXT-Version) I got a card to order some
papers and books. I think one of them was "Mathlink...", I don't know
exactly because I sent this card off to get the papers.
Some of them are for free, others cost $10. I think "Mathlink..." is
for free :-)

The address is: Wolfram Research, Inc.
                100 Trade Center Drive
                Champaign
                Illinois 61820-7237

Bye, Torsten. 
--
                                                        ____
____________ ////_____________________________________ /   /\ ______
\           ////                                      /   /  \     /
 \  3000   ////  Torsten Buelck, 2300 Kiel, Germany  /___/ Ne \   /
  \  \\\\ ////   tuti@tutiki.toppoint.de (NeXTMail)  \   \ XT /  /
   \__\\\X///_________________________________________\   \  /__/
       \XXX/                                           \___\/
Newsgroups: comp.sys.next.programmer
From: thf@zelator.in-berlin.de (Thomas Funke)
Subject: 20000 NeXT Bugs :-(((( 
Organization: Puplic-Access-Xenix-System
Date: Thu, 16 Apr 92 16:02:26 GMT

In <3571@rosie.NeXT.COM> jdoenias@next.com (Josh Doenias) writes:


>This is indeed a bug, of which NeXT is aware.
>It is bug #19987 in our software bug database, and has been fixed for  

Now it is official: At least 20000 Bugs in NeXT-OS2.1. How many
in OS3.0 ?? 



-- 
-----------------------------------------------------------------------
Thomas Funke, Gasteinerstr. 29, 1000 Berlin 31, Germany, +49-30-8618224  
** Registered NeXT Developer **
E-mail:  thf@zelator.in-berlin.de
-----------------------------------------------------------------------
From: azamora@hexagon.cs.indiana.edu (Tony Zamora)
Newsgroups: comp.sys.next.programmer
Subject: Re: Writing a Storage Object
Date: 8 Apr 92 03:34:02 GMT
Article-I.D.: news.1992Apr7.223410.25768
Reply-To: azamora@cs.indiana.edu
Organization: Computer Science, Indiana University

In article <1992Apr8.023553.17506@uwm.edu> xepo@csd4.csd.uwm.edu (Scott R  
Violet) writes:
> Hi,
> 	Lately I have been playing around with Storage objects and have
> encountered a few problems.  So, hopefully someone out there knows how
> to use them and would be willing to help.  First off if I had the following
> structure
> 
> struct test {
> 	int aTestInt;
> 	int arrayTest[25][3];
> };
> 
> Would the descriptor string be "{i[25[3i]]}"?

It is a good idea to use the @encode directive and typeof operator to generate  
descriptor strings.  @encode(struct test) should give you the correct  
descriptor for your structure.  If you need the encoding of a variable, you can  
use @encode(typeof(variable_name)).  This way you never have to remember all  
the rules for descriptors (and you don't get hosed if they change).

> Writing the object to a NXTypedStream seems to go ok.  But then when
> I try to read it back in I get a bus error.  When you want to read back
> in the stream, how should you initialize the object?  I have tried it
> with just testStorage = [[Storage alloc] init]; but that doesn't seem
> to work.  And I have also tried initialiving it the same way that I did
> with the first, with an initCount..., but that doesn't seem to work either.
> In both cases I get a Bus error.  I am hopping that it is something 
> simple, anyone have any suggestions?
> Thanks in advance,
> 			-Scott Violet (xepo@csd4.csd.uwm.edu)

I use code like

storage = NXReadObject(stream); // to read a storage object (Storage *storage)
NXWriteObject(stream, storage); // write a storage object

and that works for me.  NXReadObject should allocate the memory for the object,  
so you shouldn't have to do anything special.

Tony
-- 
Tony Zamora
Department of Computer Science, Indiana University
azamora@cs.indiana.edu
"They thought it was love, but it was only the caffeine."
From: michael@stb.info.com (Michael Gersten)
Newsgroups: comp.sys.next.programmer
Subject: Re: text with emacs binding - REQUEST
Date: 11 Apr 92 04:19:14 GMT
Organization: STB BBS, La, Ca, 310 397 3137

In article <1992Mar25.153419.16666@sinix.UUCP> dhg@sinix.UUCP (David Griffith) writes:
>Yes, I was wondering about this too, but from a different angle. The power
>of NeXTStep would be greatly enhanced if you could "add value" to the
>standard app kit objects such that all applications would inherit the
>new functionality *without* recompilation. That way, developers could
>sell value added versions of NeXTStep objects.

I thought that Objective C allowed you to override parts of a class. So you
could override the alloc, init, and free methods, and make sure that
you set up a delegate that handled any new keystrokes.

Or am I missing something very basic?

-- 
		Michael Gersten		michael@stb.info.com
HELLO! I'm a signature virus! Join in the fun and copy me into yours!
ex:.-1,. w $HOME/.signature
From: cnh5730@calvin.tamu.edu (Charles N. Herrick)
Newsgroups: comp.sys.next.programmer
Subject: Re: More on ND compression (followup survey)
Date: 12 Apr 92 22:02:51 GMT
	<1992Apr12.150556.10435@cube.handheld.com>
Organization: Please note: I speak only for myself
In-reply-to: jmd@banana.handheld.com's message of 12 Apr 92 15:05:56 GMT

In article <1992Apr12.150556.10435@cube.handheld.com> jmd@banana.handheld.com (Jim De Arras) writes:
   I'm glad to see NeXT is looking into this issue.
   A peaceful settlement would
   be best.  I understand under Virginia law, I could probably make bait and
   swiitch stick.  I think enough other states are able to do so, 
   also, so that a class action suit for fraud could be possible.

Hope this won't come to pass. All of us would be badly-served by this.

	chuck <cnh5730@calvin.tamu.edu>
--
 <->   My personal opinion, speaking only as myself, an individual :-)   <->
	<->	Not an official document of anyone	<->
	     <-> from: a SUN SPARC1+ w/ SUNos 4.1 <->
 	    Charles N. Herrick <cnh5730@calvin.tamu.edu>
From: michael@stb.info.com (Michael Gersten)
Newsgroups: comp.sys.next.programmer
Subject: Re: Linear mouse on the NeXT??
Date: 11 Apr 92 05:29:29 GMT
Organization: STB BBS, La, Ca, 310 397 3137

In article <1992Apr3.073228.22896@csus.edu> eps@cs.sfsu.edu writes:
>In article <3481@rosie.NeXT.COM> sam_s@NeXT.com (Sam Streeper) writes:
>>This only requires a trivial C program.  There's an ioctl to set the mouse
>>scaling thresholds, and if you do "man evs" it should tell you what you
>
>Um, what's wrong with the
>
>	% dwrite NeXT1 MouseScaling "1 1 1"

The problem with this is that it gives you about a 72 DPI mouse.

The NeXT mouse returns a nice high resolution (I assume) data rate, which
goes into a divider to bring it down to about 72DPI; this then gets multiplied
as specified in Mouse Scaling.

But if you want a uniform high rate, you're out of luck.

What do I base this on? The observation that I can move the mouse a noticable
amount, and even feel the wheels turn, and the mouse pointer does not move
a pixel. Plus that when I do set "1 1 1", I get about one inch is 70 dots.
Since this is so close to the 72 figure, I'm assuming experimental error. And
no one makes mice that slow.
-- 
		Michael Gersten		michael@stb.info.com
HELLO! I'm a signature virus! Join in the fun and copy me into yours!
ex:.-1,. w $HOME/.signature
From: dudney@discovery.tamu.edu (William A. Dudney)
Newsgroups: comp.sys.next.programmer
Subject: Re: Have problem with [self display]....
Date: 16 Apr 92 20:01:04 GMT
Reply-To: dudney@discovery.tamu.edu

In article <1992Apr14.144842.11601@aio.jsc.nasa.gov> bill@eplnxt.jsc.nasa.gov  
writes:
> I have a view named myView and after calling a few funcions from another  
> file am trying to get the view to redraw itself but all I am getting is a  
> error: (null pointer) Does not recognize selector forward::
> 
> 
> The view is properly named.  All of my calls orginate from within the  
> myView.m file. Anyone have any ideas as to what the problem could be?
> 
> 		Bill

Hi Bill,
If you post your code segment I would be happy to look at it for you. I tried  
to mail you a response but got a host unknown message. I you dont tell NG to  
post your correct mail address it sometimes gets it wrong....

Happy Hacking

Bill Dudney
dudney@discovery.tamu.edu
From: simsong (Simson L. Garfinkel)
Newsgroups: comp.sys.next.programmer
Subject: RTFD
Date: 8 Apr 92 14:08:15 GMT
Reply-To: simsong@next.cambridge.ma.us
Organization: NeXTWORLD Magazine

Does anybody have the Text Cell class done for handling RTFD documents?

Can you email me a copy?

-simson
-- 

................................................................simson
From: ralf@reswi.en.open.de (Ralf E. Stranzenbach)
Newsgroups: comp.sys.next.programmer
Subject: Re: NeXT-cc bug report
Date: 13 Apr 92 22:08:01 GMT
Organization: News on  RESWI from ENtenhausen.OPEN.DE

In article <2121@transfer.stratus.com> dan@quiensabe.az.stratus.com  
(Dan Danz) writes:
> In article <1992Apr8.183539.1868@talus.com> ajamison@talus.com  
(Alex  
> Senkevitch) writes:
> > In article <1992Apr7.084848.29747@reswi.en.open.de> 
> > ralf@reswi.en.open.de (Ralf E. Stranzenbach) writes:
> > > the following code fragment did _not_ compile properly:
> > > 	void some_function (char * s)
> > > 	{
> > > 		char * d;
> > > 		d = strcpy (alloca (strlen (s) + 1), s);
> > > 		printf ("%s copied as %s\n", s, d);
> > > 	}
> > try this:
> > void some_function(char *s) {
> > 	char *d;
> > 	strcpy((d=(char*)malloc(strlen(s)+1)),s);
> > 	printf("%s copied as %s\n", s, d);
> > }
> 
> I suspect that Ralf's original problem has to do with both the  
compiler  
> AND alloca trying to anipulate the stack pointer to create
> temporary space on the stack. This is one of the things that makes  
alloca  
> a difficult function to implement. Try it by doing the alloca call  
first
> and then do the strcpy into d as a separate line of code.

As a marginal note: The code above (with alloca) works without  
problems on gcc-2.0(i386). Something has been changed ? And it  
_should_ work.... (allocating temporary strings).

	- ralf

--
Ralf E.Stranzenbach  -   (NeXT)-Mail: ralf@reswi.en.open.de
                                Fido: via 2:245/5800.12
                       (Voice)-Phone: +49 2302 / 68403
--
MSDOS 486/50MHz:
	15 Mips warten schneller.
From: simsong (Simson L. Garfinkel)
Newsgroups: comp.sys.next.programmer
Subject: Re: -=?=- dumping text into an invisible text object -=?=-
Date: 10 Apr 92 16:20:50 GMT
Article-I.D.: next.1992Apr10.162050.6931
Reply-To: simsong@next.cambridge.ma.us
Organization: NeXTWORLD Magazine

The problem is that text objects must be on real windows in order to print.

Instead of creating a new Text object to do your printing, just put a second  
text object somewhere else in your window.

Make otherText the id of that text object.

	[window addSubview:otherText]
	[otherText moveTo:1e30 :1e30];

Now shove the stuff you want into otherText and have it print...
-- 

................................................................simson
Newsgroups: comp.sys.next.programmer
From: jadams@ux2.cso.uiuc.edu (Jeffrey J. Adams - Invoice)
Subject: >"Other" page sizes
Keywords: postscript,layout
Organization: University of Illinois at Urbana
Date: Thu, 9 Apr 1992 06:26:40 GMT

Mac Gillon (NeXT) explained to me that I need device dependent code
since the NeXT generates device independent postscript.

Experimenting with Aldus Freehand on a Mac and creating a PS file
with Lino 300 printer specifications, I believe I found the line I
need:

statusdict begin 504 1476 0 1 setpageparams end

Does anyone know if this is the line I need (or more) to specify
a custom page size for a Lino 300 with postscript generated
by a NeXT.

Jeffrey Adams
NeXT Registered Developer   
Newsgroups: comp.sys.next.programmer
From: jgg@proforma.com (J. G. Gregory)
Subject: Re: tracing a bezier curve
Organization: Pro Forma
Date: Sun, 12 Apr 1992 02:14:06 GMT

In article <1992Apr7.203952.300@agog.com> greg@agog.com (Greg Cockroft) writes:
>
>The parametric equation is 
>	x = x0*(1-t)^3 + x1*3*t*(1-t)^2 + x2*3*t^2*(1-t) + x3*t^3
>
Yes, but he wanted the y = f(x) implicit equation.  I recommend the book,  
"Curves and Surfaces for Computer Aided Geometric Design" by Gerald Farin.  It  
includes a section on just what the original poster wanted.  The "killer B's"  
book (Bartels, Beatty, Barsky) is too full of the "blending function" nonsense.
The Farin book gives a much more intuitive approach, better suited to non-math  
types.

--J Gregory
Newsgroups: comp.sys.next.programmer
From: sunthej@alleg.edu (Jake)
Subject: Problem with graphics in Textobject
Organization: Allegheny College
Date: Tue, 14 Apr 1992 03:05:23 GMT

Hi all.  
I've got a strange sort of problem, although I think I know the solution,  
I don't know how to implement it.  I'm using Jayson Adams technique for  
putting graphics in a Text object (ie:

//select the sel I want//
newImage = [[NXImage alloc] initFromFile:[openPanel filename]];
newGraphic = [[GraphicImage alloc] initForImage:newImage];
[[dmCardFace docView] setMonoFont:NO];
[[dmCardFace docView] replaceSelWithCell:newGraphic];

My only problem is that when I have the imported image on the same line as  
some text, where the picture goes past the right side of the view, the  
picture appears double- once on the line with the text on it, once on the  
line below it.  If I delete one image they both disappear.

It seems to me that there needs to be somekind of update to move the  
picture to the next line... does anyone have any ideas how?

						Thanks a lot,
							Jake
EMAIL: sunthej@alleg.edu
From: dan@quiensabe.az.stratus.com (Dan Danz)
Newsgroups: comp.sys.next.programmer
Subject: Re: NeXT-cc bug report
Date: 12 Apr 92 18:47:20 GMT
Reply-To: dan@az.stratus.com

In article <1992Apr8.183539.1868@talus.com> ajamison@talus.com (Alex  
Senkevitch) writes:
> In article <1992Apr7.084848.29747@reswi.en.open.de> 
> ralf@reswi.en.open.de (Ralf E. Stranzenbach) writes:
> > the following code fragment did _not_ compile properly:
> > 	void some_function (char * s)
> > 	{
> > 		char * d;
> > 		d = strcpy (alloca (strlen (s) + 1), s);
> > 		printf ("%s copied as %s\n", s, d);
> > 	}
> try this:
> void some_function(char *s) {
> 	char *d;
> 	strcpy((d=(char*)malloc(strlen(s)+1)),s);
> 	printf("%s copied as %s\n", s, d);
> }

What Alex has done is create a memory leak -- every time this
version of the routine is called, it allocates something in the
heap and then leaves it there.   That's the beauty of alloca --
it allocates on the stack (by extending the stack pointer), and
this storage is automatically reclaimed when the subroutine 
returns.

Obviously, the way to fix Alex's version is to add a free(d) 
statement. before the return.  Maybe Alex knew this, but I others reading   
this post might not.

I suspect that Ralf's original problem has to do with both the compiler  
AND alloca trying to anipulate the stack pointer to create
temporary space on the stack. This is one of the things that makes alloca  
a difficult function to implement. Try it by doing the alloca call first
and then do the strcpy into d as a separate line of code.

--
L. W. "Dan" Danz                  VOS Mail:  Dan_Danz@vos.stratus.com
Sr Consulting Software SE         NeXT Mail: dan@az.stratus.com
Customer Assistance Center        Voice Mail/Pager: (602) 852-3107
Telecommunications Division       Customer Service: (800) 828-8513
Stratus Computer, Inc. 4455 E. Camelback #115-A, Phoenix AZ 85018
Newsgroups: comp.sys.next.programmer,comp.sys.next.misc