HDTenEightyP/NetNews huggingface dataset:
From: andrew@cubetech.com (Andrew Loewenstern)
Subject: Re: Destroying Zones
Organization: Cube Technologies, Inc.
Date: Tue, 28 Jul 1992 19:20:06 GMT

In article <1992Jul27.010436.1749@kakwa.ucs.ualberta.ca> gary@niagara.ucs.ualberta.ca (Gary Ritchie) writes:
>I'm loading a nib file into its own zone, so that I can later destroy the  
>zone and make everything go away.  I'm having a problem because the nib  
>file contains Windows, and the program has a segmentation fault shortly  
>after the zone is destroyed.
>
>I remember glancing at an article in the spring NeXTworld magazine which  
>discussed how to deal with freeing zones which contain Windows, but I  
>don't have access to that particular issue anymore.
>
>Could someone give me a quick summary on the steps necessary?

Make sure you orderOut and free all of the windows in the zone before
destroying it or things will die.  


andrew
-- 
andrew@cubetech.com
Andrew Loewenstern      | "If I am not for myself, who will be for me?
Cube Technologies, Inc. |  If I am only for myself, who am I?" -Hillel
From: mmeyer@next.com (Morris Meyer)
Newsgroups: comp.sys.next.programmer
Subject: Re: sun to NeXT missing ()s
Date: 24 Jul 92 18:17:09 GMT
Reply-To: mmeyer@next.com (Morris Meyer)

Charles Wilcox writes
> i've created my own putenv and strdup, but on_exit i skipped.


Try atexit() for on_exit().

		--morris

_____________________________________________________________
Morris Meyer - ISDN Project - NeXT Software - mmeyer@next.com
Newsgroups: comp.sys.next.programmer
From: jgg@proforma.com (J. G. Gregory)
Subject: lines, arcs, curves in RenderMan?
Keywords: renderman
Organization: Pro Forma
Date: Mon, 27 Jul 1992 01:31:12 GMT

I am sure I am missing something, but I open myself to abuse by asking a  
potentially stupid question:

How do you draw lines, arcs, or other curves in the 3Dkit?

I thought RenderMan would have a standard way to get "zero thickness" objects  
like the way PostScript has strokes of 0 width -- It does the finest line  
possible on the device.  But the "RenderMan Companion" doesn't act like people  
draw lines, and I am confused.

Do I just do PostScript, pumping my own points through the 3DCamera's  
transform?  Use small cylinders? Polygons?

Please no news on The Theory of Renderman, etc.  I understand the high-end  
goals.  But I was under the impression that the 3Dkit would do a lot of the 3D  
transforms for me.  People even said, "Think of it as 3D PostScript".

I hope I'm missing something.
--J Gregory
Newsgroups: comp.sys.next.programmer
From: jscherer@novell.com
Subject: NeXT Fax format
Reply-To: jscherer@novell.com
Organization: Novell, Inc.
Date: Mon, 27 Jul 1992 23:38:07 GMT

Can someone tell me what format a fax is stored in on my NeXT..


John Scherer
jscherer@novell.com
Newsgroups: comp.sys.next.programmer
From: moose@svcdudes.com
Subject: Re: Destroying Zones
Reply-To: moose@svcdudes.com
Organization: Software Ventures, Inc.
Distribution: na
Date: Mon, 27 Jul 92 16:48:51 GMT

In article <1992Jul27.010436.1749@kakwa.ucs.ualberta.ca>  
gary@niagara.ucs.ualberta.ca (Gary Ritchie) writes:
> I'm loading a nib file into its own zone, so that I can later destroy the  
> zone and make everything go away.  I'm having a problem because the nib  
> file contains Windows, and the program has a segmentation fault shortly  
> after the zone is destroyed.
> 
> I remember glancing at an article in the spring NeXTworld magazine which  
> discussed how to deal with freeing zones which contain Windows, but I  
> don't have access to that particular issue anymore.
> 
> Could someone give me a quick summary on the steps necessary?

Grab the entire window list and iterate through it.  You can find all the  
windows you want by doing a [[windowList objectAt:count] zone] == ZoneToDie.

Something to note, though, NeXT puts icons and sounds in whatever zone was  
active when the tiff was loaded.  But future loadings will not reload the tiff,  
but point to the already existing tiff.  Therefore, if you kill a zone, you  
will kill tiffs that other zones point into.


--
Michael Rutman			|	moose@svcdudes.com
Cubist				|	makes me a NeXT programmer
Software Ventures		|	maker of MicroPhone II
#include <std.disclaimer>
Newsgroups: comp.sys.next.programmer
From: BrianW@SoundS.WA.com (Brian Willoughby)
Subject: Re: Question about visibility of interface variables
Reply-To: BrianW@SoundS.WA.com
Organization: SoundSoftware, Bellevue, WA, USA
Date: Thu, 30 Jul 1992 07:37:26 GMT

Darcy Brockbank writes
| In article <20JUL92.11345443@enh.nist.gov> aoml@enh.nist.gov writes:
| > I need to have a couple of variables which are specific to the particular
| > nib section that is loaded.  (I have several of the same nib files on  
| > screen at the same time, but each must have its own, discrete data set).  I
| > figure that by putting these variables in the @interface section of the
| > header file, they will be specific, like I need.  However, a large part of
| > my file consists of regular C functions (which run faster, I think, than  
| > methods).  When I put the variables in the @interface section, my functions
| > can no longer see them.  I can see what is going on here, and where my  
| > problem is.  Does anyone know of a better way of handling this than
| > changing my functions into methods?  Thanks.
| > Kevin
| 
| Variables declared in the interface section are global only to that object's
| methods, and the subclasses of that object.

Actually, @interface variables are not global in the K&R sense.  They are local  
variables whose scope includes the object and its subclasses.  Just like a  
recursively called function will have multiple copies of the same variables,  
multiple objects each have their own copy of the @interface variables - they  
are not global.

| In order to make private variables that are also available to
| an object's functions you can make static declarations within the
|  .m file. You wan't have access to those variables from subclasses
| though.

Warning: static variables are global and not created for each instance of the  
object.  The original question indicated a need for each nib section that is  
loaded to have its own discrete data set - static declarations will not provide  
discrete instance variables.

To answer the original question, about the only way to have discrete instance  
variables accessable by regular C functions would be to allocate a structure  
every time you load the nib section and pass the pointer to this structure to  
the regular C functions whenever you want to operate on a particular instance  
of the nib.  Basically you would have to rewrite the Objective-C runtime - so  
why not use it?
-- 
Brian Willoughby	Software Design Engineer, BSEE
BrianW@SoundS.WA.com	SoundSoftware
NeXTmail welcome
Newsgroups: comp.sys.next.programmer
From: senger@csfac.uwlax.edu 
Subject: AppInspector
Reply-To: senger@csfac.uwlax(Steven Senger)
Organization: University of Wisconsin - La Crosse Computer Science Department
Date: Wed, 29 Jul 1992 18:01:21 GMT

I have never been able to get AppInspector to run correctly on my 
home machine (currently at 2.1). After starting AppInspector and
selecting "Application" > "Open" I do not get the panel of 
applications. Things work fine on my office machine. I have been
unable to determine any difference which might explain things. 
I have had this problem for sometime. I am sure this has come 
up before. Has anybody else seen this.

- steve
  senger@csfac.uwlax.edu
Newsgroups: comp.sys.next.programmer
From: nevin@dtint.dtint.com
Subject: Example use of DBKIT?
Keywords: DBKIT 3.0 (PR2)
Reply-To: nevin@dtint.dtint.com
Organization: Digital Technology, International
Date: Thu, 23 Jul 92 03:55:33 GMT

I am running NeXTSTEP 3.0 (PR2) and have begun playing with DBKIT.   
Haven't gotten very far, though.  While it appears that most of the DBKIT  
documentation is online, some of it just says:

                         << Forthcoming >>

I am sure the final release will have all of the "<< Forthcoming >>" stuff  
replaced with real documentation, but in the meantime, anybody got some  
sample code they could share?

Because of non-disclosure, please email me, and I will respond with info  
on exactly where I am stumped. My email address is (in case the header has  
munged it):

              nevin@dtint.dtint.com

Thanks!

--
NeXTmail preferred!
-- 
---
root	                               root@dtint.dtint.com
Digital Technology Int.                (801)226-2984	
500 W. 1200 South, Orem UT, 84057      FAX (801) 226-8438
From: ddsmith@lynx.cs.washington.edu (Douglas D. Smith)
Newsgroups: comp.sys.next.programmer
Subject: Is there a unistd.h file?
Date: 28 Jul 92 18:44:33 GMT
Distribution: comp.sys.next.programmer, comp.sys.next.sysadmin
Organization: UW Computer Science


I'm hoping someone can help me.  I'm trying to compile a multi-file 
C program on a NeXT using an existing "make" file.  I've edited the
file for appropriate paths, flags, etc.  My problem is that the 
program is trying to find a header file called unistd.h which exists
on some Unix systems but doesn't seem to exist on the NeXT.  Is 
there another header file that would refer to the same routines in 
unistd.h?  If so, what's it called?  if not, do you have any 
suggestions (other than re-writing all the code that uses this 
header file)?

Thanks,

--
==	Douglas D. Smith   ====   ddsmith@cs.washington.edu     ==
From: anderson@sapir.cog.jhu.edu (Steve Anderson)
Newsgroups: comp.sys.next.programmer
Subject: unexNeXT.c
Date: 23 Jul 92 11:32:45 GMT
Distribution: comp
Organization: Dept. of Cognitive Science, The Johns Hopkins University


I've been bringing up Lucid's version of emacs-19 on my NeXT (using
PenCom's co-Xist development environment). In doing so, I made use of
the unexNeXT.c which I found in the NeXT-ified sources for emacs
18.57, which works fine with the lemacs-19 sources. It says at the top
of that file that this was written by Bradley Taylor
(<btaylor@NeXT.COM>), but a note sent to that address was returned
"Unknown User".

The problem is that (unlike the other files in the emacs distribution)
there's no explicit invocation of the GPL at the top of unexNeXT.c.
I'd like to be able to distribute the NeXT port of lemacs (actually,
what I want is to have the NeXT changes folded into the Lucid
distribution directly). The lemacs-19 sources are entirely covered by
the GPL, and I'd like to get permission to include a standard
reference to the GPL at the top of unexNeXT.c so it can be distributed
too.

So how can I find Bradley Taylor - or, failing that, who else can
provide me with a GPL-ized version of his (or another working)
unexec.c for NeXT? 

Thanks for any help.

Steve Anderson

Dept. of Cognitive Science
The Johns Hopkins University

<anderson@sapir.cog.jhu.edu>
From: isbell@cats.ucsc.edu (Art Isbell)
Newsgroups: comp.sys.next.programmer
Subject: Re: DBKit: updating key fields
Date: 28 Jul 92 02:53:35 GMT
Organization: Cubic Solutions - NeXT software development and consulting
NNTP-Posting-Host: am.ucsc.edu


Possibly, DBKit is trying to protect you from Sybase (and maybe many other
DBMS's).  Editting a key field is dangerous because Sybase implements an update
as a delete followed by an insert.  If the change you have made to a unique key
results in a duplicated key (another record with the same key exists), bye-bye
record.  The insert fails but the delete has already occurred!

So maybe the correct way to change a key is to insert a new record with the key
changed as you desire and if that succeeds, delete the previous record.
-- 

Art Isbell                                                      Cubic Solutions
NeXT Registered Developer #745         NeXT software development and consulting
Email: isbell@cats.UCSC.EDU                                Voice: (408)335-1154
USmail: 95018-9442                                           Fax: (408)335-2515
Newsgroups: comp.sys.next.programmer
From: greg@afs.com (Gregory H. Anderson)
Subject: Re: Formcell behaviour
Reply-To: greg@afs.com
Date: Tue, 28 Jul 1992 22:31:17 GMT

In article <1992Jul27.132231.19873@monu6.cc.monash.edu.au>  
ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson) writes:
> A mouse click event in an entry starts text editing in that entry.  A 
mouse click event outside the Form or a RETURN key event while editing an 
entry causes the action of the entry to be sent to the target of the entry 
if there is such an action; otherwise the action of the Form is sent to 
the target of the Form.

Because this object is braindead.  8^)

Seriously, only an actual <CR> forces the action method. This is a Bad  
Thing, because I have watched many users not bother to hit any field  
movement key after t hey finish typing in a field. If the next thing they  
hit is the Save button, the last field never gets a chance to validate.  
IMHO, any inter-field movement should trigger the action method.

For what you want, the Matrix which contains the FormCells must have a  
text delegate, and you must use the text delegate methods (textWillEnd:,  
textDidGetKeys:, etc.) to validate as they type. Even with this procedure,  
the delegate methods seem to jump off at different points depending on  
whether the keyboard or the mouse was used to instigate the field  
movement. Bottom line, the action method is not reliable.

--
Gregory H. Anderson          | "We're very tolerant around here,
Benevolent Dictator-for-Life |  being only amateurs ourselves."
Anderson Financial Systems   | - Tortoise (Godel, Escher, Bach)
greg@afs.com  (Nextmail OK)  | 
Newsgroups: comp.sys.next.programmer
From: aozer@next.com (Ali Ozer)
Newsgroups: comp.sys.next.programmer
Subject: Re: NXRectFill - How to use this correctly?
Keywords: NXRect, NXRectFill, Color, NXColor
Date: 23 Jul 92 02:54:13 GMT
Organization: Next Computer, Inc.

In article <1992Jul22.161151.7557@cs.rose-hulman.edu> Andy McConnell writes:
> 	NXSetColor( GaugeDat.backColor );
>	NXRectFill(&bounds);
>GaugeDat.backColor is just an NXColor.  However, this little ditty does  
>absolutely nothing that I can see, no matter how backColor is set.

This should just work. Perhaps you are not focused properly on a view? You
can use the "showps" command in gdb to cause the kit to show you all the
PostScript it generates; you can "showps" right before those two lines and
then "shownops" and see if the generated PostScript you get is reasonable.

One caution about stepping in gdb, though: Just because you execute a line 
which generates some PostScript, and you actually see it being generated, 
(thanks to "showps"), it doesn't mean the line got executed by the 
windowserver. You might need to explicitly flush by typing "flush" or
"p NXPing()".

Ali, Ali_Ozer@NeXT.com
Newsgroups: comp.sys.next.programmer
From: greg@afs.com (Gregory H. Anderson)
Subject: Re: AFS volunteers to keep FAQ, provide free email support
Reply-To: greg@afs.com
Date: Wed, 29 Jul 1992 21:32:21 GMT

Wow! Now I know what it means when people say "My email box was flooded."  
Apparently we have hit a nerve.

We will be accumulating peoples' ideas about FAQ organization and posting  
some preliminary thoughts over the weekend. Thanks for all the interest  
and kind words about our offers. In the meantime, keep those cards and  
letters rolling in.

--
Gregory H. Anderson          | "We're very tolerant around here,
Benevolent Dictator-for-Life |  being only amateurs ourselves."
Anderson Financial Systems   | - Tortoise (Godel, Escher, Bach)
greg@afs.com  (Nextmail OK)  |
From: hans@dev01 (Hans Peter Geiser)
Newsgroups: comp.sys.next.programmer
Subject: Problems with ColorWells in a ScrollView
Keywords: Colorwell, Scrollview
Date: 27 Jul 92 14:58:40 GMT

Hello !

I have a little problem (or bug) which everyone can reproduce in a few seconds.
Just start the IB , drag some ColorWells one beyond the other and group them in  
a ScrollView. If you try this in the Test-Mode (or in the compiled version)  
you'll see that the ColorWells aren't displayed correctly. If you move the  
scrollbars fast enough all is okay, but if you get slower you'll miss some  
ColorWells. But they still there as you can see by clicking on the place where  
they should be.
Does anybody knows what happens or better how to solve this problem? 

Thanks for answers    Hans-Peter Geiser
Newsgroups: comp.sys.next.programmer
From: dennis@fnbc.com (Dennis Box )
Subject: (probably) newbie question about keyboard intercepts
Reply-To: dennis@fnbc.com (Dennis Box )
Organization: First National Bank Of Chicago, Chicago IL, USA
Date: Mon, 27 Jul 92 22:06:24 GMT

Hello all,

I have a NextStep application that occasionally goes into a (long) loop
when a user asks the wrong query of its database. I have been asked
to change this behaviour so that a control-c ejects the program from the
loop, returning control to the main event loop.

My question is, where do keyboard interrupts go, and how does a programmer
detect and use them?  The unix <signal.h> stuff doesn't work, NextStep or
Mach or something obviously grabs signals uses them to its own ends.

Is there a function in NextStep that is as conceptually easy as the 
signal.h stuff ?  Better yet, which appkit object contains the
[actNormallyUntillAControlcIsPressedThenSendMessageTo:myObject] method?
Can I easily roll my own such method?


Thanks in advance,


--
Dennis D. Box          	|   (312) 732-6329 	| "Its FUN to have fun,
My own opinions, not 	| dennis@fnbc.com      	| but you have to know 
my employers. Your 	| ddb@vpnet.chi.il.us	| how!"   -T. Geisel
reactions may vary. 	|  Kill Your Television.
From: zazula@pri.com (Ralph Zazula)
Newsgroups: comp.sys.next.programmer
Subject: Re: NXSplitView with VERTICAL bar
Date: 24 Jul 92 01:14:42 GMT
Reply-To: zazula@pri.com
Distribution: world,local

In article <1992Jul22.172001.515@swabsib.stgt.sub.org>  writes:
> Hi,
> 
> I want to rotate a NXSplitView like in the NewsGrazer, so that I can devide 
> two subviews with a VERTICAL bar. 

Hi -

MiniExamples to the rescue, again (se Re: NXBrowser Class Help!).

Check out the ZooView MiniExample.  In particular, the "SideSplitView" class.

Happy Hacking,
Ralph
From: prim!dave@germany.eu.net (Dave Griffiths)
Newsgroups: comp.sys.next.programmer
Subject: Filenames not presented to Services
Date: 1 Aug 92 01:48:23 GMT
Organization: Primitive Software Ltd.

I had an idea for a Service utility that would take as input a filename. The
filename would usually be associated with the key window. For instance, if
you are in Edit, the name of the file you are editing is presented to any
Service that wants to use it.

Unfortunately, I have just discovered that Edit is one of the few apps that
*do* present the filename to a Service. Improv, WriteNow, WordPerfect etc
do not. This seems a bit of a shortcoming (and has scuppered the plans for
my utility!). The problem is that the app must explicitly do things to 
provide the filename as a Service send type.

How can the default behaviour be improved? One way would be for NeXT to add
the functionality to present the filename as a Send type by default. This
could be done in the setTitleAsFilename: method of Window.

While we're on the subject, I was also planning to be able to drop the
filename icons into my utility as an alternative to using a service. It
would be neat if the icon for the file currently being edited in an arbitrary
application was readily available, say in the window title bar. (I was also
going to write a Service utility to display the icon for the current
filename, but if only Edit and Draw can use it there doesn't seem much point!).

Is the situation any better in 3.0?

Dave Griffiths
Newsgroups: comp.sys.next.programmer
From: moose@svcdudes.com
Subject: Re: (probably) newbie question about keyboard intercepts
Reply-To: moose@svcdudes.com
Organization: Software Ventures, Inc.
Distribution: na
Date: Tue, 28 Jul 92 16:49:14 GMT

In article <1992Jul27.220624.1369@fnbc.com> dennis@fnbc.com (Dennis Box )  
writes:
> Hello all,
> 
> I have a NextStep application that occasionally goes into a (long) loop
> when a user asks the wrong query of its database. I have been asked
> to change this behaviour so that a control-c ejects the program from the
> loop, returning control to the main event loop.
> 
> My question is, where do keyboard interrupts go, and how does a programmer
> detect and use them?  The unix <signal.h> stuff doesn't work, NextStep or
> Mach or something obviously grabs signals uses them to its own ends.

You can get the next key event with a getNextEvent: method in Application, or  
you can directly querry them using the evs stuff (look in the man pages).

However, NeXT recommends you use the NXUserAborted() function to detect the  
user hitting cmd-.
--
Michael Rutman			|	moose@svcdudes.com
Cubist				|	makes me a NeXT programmer
Software Ventures		|	maker of MicroPhone II
#include <std.disclaimer>
Newsgroups: comp.sys.next.programmer
From: eps@futon.SFSU.EDU (Eric P. Scott)
Subject: Re: Info on Services
Reply-To: eps@cs.sfsu.edu
Organization: San Francisco State University
Date: Wed, 22 Jul 1992 07:30:53 GMT

In article <1992Jul20.234028.931@agora.uucp> bobb@agora.rain.com
	(Bob Beauchemin) writes:
>  I'd like to do something similar to what Interface Builder does when you
>invoke the "make" function. It appears that Interface Builder sends a
>message to Workspace Manager to launch a program (shell) and sends a series
>of commands to it to accomplish the make. I've looked at the subprocess
>example, but its not usable for the purpose I'm looking for.
>
>  Does anyone know how IB does this? There is an entry in the Services
>menu for "Open in Workspace" and I'm guessing that's how it may be
>accomplished.

Not even close.  I've posted this a few times in the past:

#import <appkit/Application.h>
#import <appkit/Listener.h>
#import <appkit/Speaker.h>
#import <appkit/publicWraps.h>

// Simulate typing the supplied string at a Workspace Shell Tool,
// creating a new Shell if necessary.  Unlike the UNIX system()
// function, you need to add the trailing \n explicitly.
int doUnixCommand(const char *command)
{
    int s;
    id spkr;
    static int toolPid;

    spkr=[NXApp appSpeaker];
    [spkr setSendPort:NXPortFromName(NX_WORKSPACEREQUEST, (const char *)NULL)];
    // If we simply used the doUnixCommand: method, it would always
    // launch a new Shell each time.
    if ((s=[spkr selectorRPC:"doUnixCommand:oldTerminal:newTerminal:"
	paramTypes:"ciI", command, toolPid, &toolPid])!=0) NXBeep();
    return s;
}

I assume that since this is undocumented, it doesn't work in 3.0,
but since I'm probably the only regular poster to this newsgroup
who doesn't have 3.0PR2, I just can't tell you.

>  Is there documentation of the standard services provided by the NextApps
>(like Workspace Manager) and how to access them?

There's documentation on the _standard_ services, but this isn't
a standard service.  I've heard that NeXT is going to
significantly deemphasize Speaker/Listener usage in 3.0.

					-=EPS=-