HDTenEightyP/NetNews huggingface dataset:
From: greg@afs.com (Gregory H. Anderson)
Subject: Re: NXBRowsers and Arrow Keys
Reply-To: greg@afs.com
Date: Thu, 19 Nov 1992 16:46:32 GMT

In article <1992Nov17.191020.15855@cs.mcgill.ca> samurai@cs.mcgill.ca  
(Darcy BROCKBANK) writes:
> Can someone tell me the trick used to make the NXBrowser work
> with arrow keys?
> 
> The docs say do this:
> 
> [myBrowser acceptArrowKeys:YES andSendActionMessages:YES]
> 
> And that's all you need. The browser should then respond to
> - acceptsFirstResponder with YES, which it does, but even if
> I programatically tell it - becomeFirstResponder the arrow
> keys never get through to it (and I get the system beep).

You've got the responder chain management backwards. You need to say

[theBrowsersWindow makeFirstResponder:theBrowser]

because -becomeFirstResponder is a message from the Window to the object,  
as a form of command: "I've decided (or I've been told) that it's your  
turn to take the baton." And in fact, the object can refuse to  
becomeFirstResponder by returning nil! So you have to message the Window  
to get the work done. It will send -becomeFirstResponder for you.

We also say

[theBrowser useScrollButtons: YES];
[[theBrowser matrixInColumn:0] selectCellAt: 0 : 0];

but I don't know whether these make a difference or not for the arrow  
keys. Try it!


--
Gregory H. Anderson          | Thus spake the master programmer: 
Master Programmer / Manager  | "Let the programmers be many and  
Anderson Financial Systems   | the managers few; then all will be 
greg@afs.com  (Nextmail OK)  | productive." -- Tao of Programming
Newsgroups: comp.sys.next.programmer
From: BrianW@SoundS.WA.com (Brian Willoughby)
Subject: Anyone have early JPEG/TIFF draft specs?
Reply-To: BrianW@SoundS.WA.com
Organization: SoundSoftware, Bellevue, WA, USA
Date: Thu, 19 Nov 1992 02:14:55 GMT


In the Release Notes for 3.0 under AppKit, the following statement is made:

"	Under NeXTSTEP 2.0 JPEG images were written using a very early draft of  
the new TIFF standard. Because of numerous revisions to this spec, JPEG images  
written under 2.0 are pretty much _not_ compatible with anything, except that  
they can be loaded under NeXTSTEP 3.0.  JPEG images written under 3.0 are  
compatible with the TIFF 6.0 draft but cannot be read back on earlier versions  
of NeXTSTEP."

Does anyone have access to these early drafts?  Even a good idea of what the  
various private TIFF tags mean would help.  I would like to write a conversion  
program which reads in old NeXT-specific JPEG TIFFs and write out JPEG TIFFs  
which are compatible with the other platforms which are used by people I send  
images to.  A quick investigation shows that it doesn't appear to be a simple  
matter of changing the TIFF tags to standard numbers - the format of the extra  
information has also changed quite a bit.
-- 
Brian Willoughby	Software Design Engineer, BSEE NCSU
BrianW@SoundS.WA.com	Sound Consulting and Signal Processing Software
NeXTmail welcome	- NO EMAIL SOLICITATION without prior permission
Newsgroups: comp.sys.next.programmer
From: fischer@iesd.auc.dk (Lars Peter Fischer)
Subject: Re: Project Builder doesn't recognize .m changes?
Organization: Mathematics and Computer Science, Aalborg University
Date: 23 Nov 92 22:10:46


>>>>> "William" == William Barker (wrb@ulnar.biostr.washington.edu)

William> Sometimes after I've made a change in my source code files,
William> save them, and do a build (or run), Project Builder doesn't
William> recognize that there have been changes, and hence it doesn't
William> build a new version of the project.

Open a shell (Terminal, Stuart, whatever) and cd to the source
(project) directory. Do

  make depend

this will create a file called "Makefile.dependencies" describing how
files depend on one another, i.e., what must be recompiled when a
specific file is changed. This lets PB build correctly when you change
stuff.

Remember to do this whenever you

  - add new files to your project
  - add new #import directives to existing files
  - remove or otherwise change existing #import directives.

/Lars
--
Lars Fischer, fischer@iesd.auc.dk | It takes an uncommon mind to think of
CS Dept., Aalborg Univ., DENMARK. | these things.  -- Calvin
Newsgroups: comp.sys.next.programmer
From: demarco@fsd.cpsc.ucalgary.ca (Vince Demarco)
Subject: LipService
Organization: University of Calgary
Date: Mon, 16 Nov 1992 05:09:12 GMT


I have been writing a Cell for the text object, to implement a Next
Mail like lip services, thinggy.

So far everything works execept saving and retrieving the file (and
also copying and pasting the lips)

The problem is in my (read/write)RichText: methods in my custom Cell,
here is the code:

- readRichText:(NXStream *)stream forView:view
{
/******
    printf("readRichText\n");
    lipsImage = [NXImage findImageNamed:"lips"];
    sound = [[Sound allocFromZone:[self zone]] init];
    [sound readSoundFromStream:stream];
    return self;
}

- writeRichText:(NXStream *)stream forView:view
{
    if ([sound duration] <= 0.0){
        printf("writing Empty Sound\n");
        [[Sound findSoundFor:"sound.snd"] writeSoundToStream:stream];
    }else{
        [sound writeSoundToStream:streamtream];
    }
    return self;
}

The problem seems to be the Sound object isn't writing the Sound file
to the stream, so when the program attempts to read the sound file
from the stream it hangs.

I know that the above method, doesn't result in a text file being
produced, this isn't a problem in my case.

Does anyone have any suggestions???

vince

--
demarco@cpsc.ucalgary.ca
vince@whatnxt.cuc.ab.ca
Newsgroups: comp.sys.next.programmer
From: jeffo@uiuc.edu (J.B. Nicholson-Owens)
Subject: Drag and Drop behaviour for shelves (was: Re: UI:Suggestion for open and save panels)
Reply-To: jeffo@uiuc.edu (J.B. Nicholson-Owens)
Organization: University of Illinois at Urbana
Date: Sat, 21 Nov 1992 17:50:51 GMT

Larry Blische writes
> Don't forget about the Font Panel.  I'd like to see a shelf there as well to  
> hold the collection of fonts I'm using in a particular doc.

Is there any panel that should not have a shelf?  I can't think of any.

Being able to resize the shelf via the splitView is pretty nice and would be a  
good addition to all these shelves.

For an answer to the problem of dragging stuff off shelves completely instead  
of leaving a copy on the shelf and dragging a copy around, how about  
redefining the way the drag-and-drop works?  The new way would work according  
to one rule:  If the place you're dropping the dragged item to a place that  
can accept it, the shelf should show a copy (perhaps ghosted) of the dragged  
item in the place from which it was dragged.  When the drag-and-drop action  
has been completed, the shelved item can be un-ghosted, thus leaving the shelf  
looking like you never performed the drag-and-drop.  If you drop the item  
somewhere where it means nothing (dropping an item onto the background, for  
example), the shelved item is removed from the shelf.  Since the whole point  
of using the shelves is to promote drag-and-drop, it seems silly to me to have  
to use a modifier key (shift, control, command, etc.) to get the action that  
you would want when you take something off the shelf (taking a copy of the  
item off the shelf).  I agree that when I put stuff on shelves, I don't intend  
to take them off the shelf when I drag them somewhere where they are accepted.   
I intend to drag a copy of them off the shelf.
-- 
-- Jeff (jeffo@uiuc.edu)
-- NeXTmail welcome
Newsgroups: comp.sys.next.programmer
From: zaphod@ctrg.rri.uwo.ca (Lance R. Bailey)
Subject: Re: I want to see my operand stack
Reply-To: zaphod@ctrg.rri.uwo.ca
Organization: University of Western Ontario
Distribution: na
Date: Thu, 19 Nov 1992 13:40:03 GMT

In article <9232423.9043@mulga.cs.mu.OZ.AU> simong@mundil.cs.mu.OZ.AU (Simon  
Alexander GREGORY) writes:
>Im learning postscript and have realised how nice it would be if I could see
>an updated representation of my operand stack in YAP or even the console
>window will do.

do a pstack command, it will dump to the console

also, you should be using Izumi's BBFig, an expansion of Yap which handles 
bounding boxes and prevents accidental closing of windows.
--
Lance R. Bailey  System/Network Manager         Robarts Research Institute
     NeXT/email: zaphod@ctrg.rri.uwo.ca    box: Clinical Trials Resources Group
            fax: +1 519 663 3789                P.O. Box 5015, 100 Perth Dr.
            vox: +1 519 663 3787 x4108          London, Canada N6A 5K8
Killing turkeys causes winter.
Newsgroups: comp.sys.next.programmer
From: caj8106@zacnxt13.tamu.edu (Curtis A Johnson)
Subject: compression algorithms and graphics conversions
Keywords: compression, graphics, algorithm
Organization: Texas A&M University, College Station
Date: Wed, 18 Nov 1992 04:30:40 GMT

I am now trying to write a NeXTstep program that compresses/decompresses  
files as well as converts different file formats.  If anyone could send me  
any information (ie algorithms, specs, etc) on the following  
compression/decompression schems and graphic format conversion schemes I  
would be most appreciative and will also send you a copy of the program  
when I finish.

			Compression/Decompression formats

ZOO, PKPAK, ARC, PAK, LU, SQ, ZIP, LZH, DWC, COMPRESS, UNCOMPRESS, LBR

			GRAPHICS FORMATS

ANY THAT YOU CAN SEND

THANKS

CURTIS JOHNONS
CAJ8106@ZACNXT8.TAMU.EDU

Newsgroups: comp.sys.next.programmer
From: gad@eclipse.its.rpi.edu (Garance A. Drosehn)
Subject: MallocDebug and NS3.0
Date: Mon, 16 Nov 1992 10:01:04 GMT

Has anyone tried to use MallocDebug under NeXTSTEP 3.0?

I used it (once) under 2.x and it seemed to work OK.  I wanted to use it on  
a NS3.0 application, and if I link in the MallocDebug library then the  
program quits almost as soon as it starts.  No error messages or anything,  
it just quits.

Am I missing something?

The application that I'd like to MallocDebug is KPerfMon.app.  Maybe that  
particular app is doing something that MallocDebug isn't prepared to handle?

--
Garance Alistair Drosehn     =     gad@eclipse.its.rpi.edu
ITS Systems Programmer            (handles NeXT-type mail)
Rensselaer Polytechnic Institute;           Troy NY    USA
From: dillon@overload.Berkeley.CA.US (Matthew Dillon)
Newsgroups: comp.sys.next.programmer
Subject: Re:  Keeping data from swapping
Distribution: world
Date: 22 Nov 92 11:13:32 PST
Organization: Not an Organization

In article <Bx2D2p.71B@research.canon.oz.au> greyham@research.canon.oz.au (Graham Stoney) writes:
>dillon@overload.Berkeley.CA.US (Matthew Dillon) writes:
>>    The only way I know of to wire pages in memory is through
>>    kern_serv_wire_range() but it is totally undocumented.  I've never
>>    tried it myself and it probably wouldn't work from a user process.
>
>I'll be the first to admit that NeXT's documentation, particularly about
>loadable kernel servers is _badly_ lacking, but can we stick to facts when
>we're NeXT-bashing please?
>
>kern_serv_wire_range() is documented: check in NeXT Developer of the Digital
>Librarian. As to whether it will solve the original poster's problem or not...
>
>Graham

    Oops!  Your right... I had it mapped out because searching through that
    section tends to crash librarian.  I'll try indexing it again...

					    -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

Newsgroups: comp.sys.next.programmer
From: uunet!lkba!lkb (Larry Blische)
Subject: Re: UI:Suggestion for open and save panels
Reply-To: uunet!lkba!lkb
Organization: LKB Associates, Inc.
Date: Sat, 21 Nov 1992 13:37:43 GMT

In article <24047@galaxy.ucr.edu> mikes@velo.ucr.edu (Mike Shebanek) writes:

> 
> Wouldn't it be great if...
> 
> The Save and Open panels had shelves like the File Viewer and Finder panel  
so  
> you could create "bookmarks" in the file system and jump to often used  
folders  
> quickly and easily?  The Home button is a nice, but putting a shelf in  
these  
> panels would provide much more flexibility and yet not break the  
established  
> interface rules (i.e., this has already been done with the finder panel,  
> Digital Librarian, and File Viewer). 
> 
> Any comments?
> 

Don't forget about the Font Panel.  I'd like to see a shelf there as well to  
hold the collection of fonts I'm using in a particular doc.
-- 
Larry Blische
uunet!lkba!lkb
LKB Associates, Inc.
410 285 2262
From: laroche@wayne.enst.fr (Jean Laroche )
Newsgroups: comp.sys.next.programmer
Subject: NXOpen, where?
Date: 18 Nov 92 17:17:55 GMT

Hi!
Does anyone know where the global variable NXOpen is defined?

I'm trying to make my application launch and open documents by double-clicking  
them. The documentation says the workspace makes the name of the document  
accessible to the app via the public variable NXOpen, when automatically  
lauching the application.
The problem is, where the hell is NXOpen defined. It's nowhere in the include  
files which means my app cannot compile when I use it.

Any pointer would be precious!
Jean Laroche
Newsgroups: comp.sys.next.programmer
From: rpomeroy@aunext3.amd.com (Ron Pomeroy x(Coop))
Newsgroups: comp.sys.next.programmer
Subject: Re: NeXT Event Loop Question
Date: 23 Nov 92 23:59:56 GMT
Reply-To: rpomeroy@aunext3.amd.com
Distribution: usa
Organization: Advanced Micro Devices, Inc.; Austin, Texas

In article <1992Nov20.182445.9500@jarvis.csri.toronto.edu>  
west@turing.toronto.edu (Tom West) writes:
>>  A more general implementation question from a tyro NeXT programmer.
>>
>>  I am porting over an interpreter to the NeXT.  When execution is
>>called for, the program calls the execution module.  It displays
>>output to its output window and occasionally asks for input from
>>the same window.  Or at least, it should.  
>>
>>  I am at a loss as to how I am supposed to:
>>	(1) Have the rest of the system keep responding
>>	(2) Have the execution wait for key input.
>>
>>  Rather kindly, the execution process does come up for air fairly regularly.
>>Looks like: 	do
>>	        {
>>		    running = Execute ();
>>		} while (running != FINISHED)
>>
>>  On other systems, I just insert a call to the main event loop in the
>>do loop and the application is able (with a little help) to process
>>events.  Is there any equivalent to this on the NeXT?
>>
>>  Is creating a MACH thread my only alternative?  That's going to require
>>much more programming overhead than I would like (to say nothing of the
>>fact that I would have to learn all about threads in about 2 days :-)).  
>>Is there a simple method of doing all of this that I've missed?
>>
>>  Many thanks in advance.
>>-- 
>>
>>	Tom West		
>>
>>   west@turing.toronto.edu  or			"Children of the Blood"
>>tomwest@gpu.utcs.utoronto.ca  or		  -Michelle Sagara
>>       west@hsa.on.ca

Just a shot in the dark but...What about using the Subprocess class ? (see 
/NeXTDeveloper/Examples/Unix/Subprocess)  I used it to talk to a Mathematica  
kernel via an external C program (supplied with Mma).  Super easy to use.

--
Ronald Pomeroy		[Objective-Cruntime: [Smalltalk runtime]];
Advanced Micro Devices	[self dream-on];
CAM Applications Group
rpomeroy@aunext1.amd.com (NeXTmail preferred)
Newsgroups: comp.sys.next.programmer
From: Robert_La_Ferla@hot.com
Subject: Re: NXOpen, where?
Reply-To: Robert_La_Ferla@hot.com
Organization: Hot Technologies
Date: Fri, 20 Nov 1992 19:58:10 GMT

> From: laroche@wayne.enst.fr (Jean Laroche )
>
> Does anyone know where the global variable NXOpen is defined?
> I'm trying to make my application launch and open documents by
> double-clicking them.
 
NXOpen is in the defaults database.  I don't think you should be using it  
though in an application that uses the AppKit.  You should be using  
openFile:ok which is a message that your application receives when a user  
double-clicks on your document.  Note: The full path of the document is  
given in that message.

Robert La Ferla
Hot Technologies
From: matthews@oberon.umd.edu (Mike Matthews)
Newsgroups: comp.sys.next.programmer
Subject: Making a window... not a window.
Date: 18 Nov 92 03:02:08 GMT
Originator: matthews@oberon.umd.edu

OK.

I've almost got it.

But.

How in blazes are you supposed to make a window that can not be moved?  I
know you have to use the initContext:... stuff (i.e. not use IB's palettes).
I tried passing a style of NX_PLAINSTYLE to the window but the doggone title
bar was logically there.

Then I tried to subclass Window and just make all of the moveTo:: methods and
dragFrom: methods do nothing.

Then I tried to redefine the screen to be 10 pixels longer on each border and
make the window so big the title bar won't be on the screen (by using
initContext with screen, and getting the mainScreen and modifying its borders
a bit).  But that seems to make a background picture.

What am I doing wrong?  I know this breaks every NeXT interface rule that
applies, but damn the rules, I wanna go full speed ahead.

Or something like that.

Any help'd be GREATLY appreciated.
------
Mike Matthews, matthews@oberon.umd.edu (NeXTmail accepted)
------
We're fighting for this woman's honor, which is more than she ever did.
- Rufus T. Firefly, in "Duck Soup"

Newsgroups: comp.sys.next.programmer
From: hwr@pilhuhn.ka.sub.org (Heiko W.Rupp)
Subject: Re: zombies (was Re: What does a task with priority -1 mean?)
Date: Tue, 17 Nov 1992 17:32:36 GMT
Organization: The Home of the Pilhuhn

[ Distribution usa as on Ray's article does not work - besides why do ]
[ you want people outside usa not to get your articles?               ]


cc100aa@xray.gatech.edu (Ray Spalding) writes:
>To avoid zombies, a UNIX process doing a fork (a parent process)
>must reap it's child(ren).  This is done by some varient of the
>wait(2) system call, and it may be helpful to install a SIGCHLD
>handler.  The man pages seem to imply that wait() is an optional
>feature, but failure to call it will result in a zombie.

I think this description isn't quite correct, but I may be wrong: You
only get a zombie, when the parent exits without wait(2)ing for its
childs. When you can be shure, that the children die before the
parent, you don't need to wait(2), but you may for other reasons.
-- 
Heiko W.Rupp  Gerwigstr.5  7500 Kh'e 1  hwr@pilhuhn.ka.sub.org  +49 721 693642
When the weight of the paperwork equals the weight of the plane, the
plane will fly.
		-- Donald Douglas
Newsgroups: comp.sys.next.programmer
From: nevin@dtint.dtint.com
Subject: Re: Coding Rules (NOT rtf)
Reply-To: nevin@dtint.dtint.com
Organization: Digital Technology, International
Date: Fri, 20 Nov 92 07:06:07 GMT

In article <1992Nov20.065829.28459@dtint.uucp> nevin@dtint.dtint.com writes:
> In article <BxzEsF.60C.2@cs.cmu.edu> ddj+@cs.cmu.edu (Doug DeJulio) writes:
> > In article <1992Nov19.000858.26075@dtint.uucp> nevin@dtint.dtint.com  
writes:
> > >> 3.0 which might tend to reverse NeXT's original position (most of the  
3.0
> > >> slow-down is related to nib/disk/memory stuff).
> > >
> > > I've heard a slightly different story about the 3.0 slowdown, from an
> > > ex-NeXT employee.  It was caused (according to him) by a
> > > generalization of things like "malloc(512)" to
> > > "malloc(sizeof(somesuch) * 4)" in order to better support new
> > > platforms (ala 486).
> > 
> > That sort of construct is evaluated at compile-time, not at
> > execute-time.  So it would explain a slow-down in compiles, but not in
> > general performance.
> > -- 
> > Doug DeJulio
> > ddj+@cmu.edu
> 
> You're right about that particular construct.  But never-the-less, one of the  
> obvious features of "malloc()" is the ability to compute desired block size  
via  
> an arithmetic expression at run-time.  And, it's quite reasonable to choose  
an  
> appropriate arithmetic expression such that the arithmetic expression's  
syntax  
> is constant, and yet it's value changes at run-time depending on the  
hardware,  
> due to architectural differences.  I just threw out a lousy example--from the  
> hip.
> 
> I realize that many such problems could probably be handled via compile-time  
> switches and #defines, but I believe it is reasonable to conclude that some  
> would fall into the aforementioned category and be computed at run-time.   
> Hence, I believe what I was told by the ex-NeXT employee.
> 
> --
> Nevin Pratt, Digital Technology, Int'l    Orem, Ut
> NeXTmail preferred, but ONLY at my REAL email address: nevin@dtint.dtint.com

Besides, we don't need to get bogged down in "malloc()" details.  There are  
plenty of other ways that slow-downs due to code generalizations to accommodate  
architectural differences can occur.  I shot from the hip with the "malloc()"  
thing in an attempt to illustrate at least one.

--
Nevin Pratt, Digital Technology, Int'l    Orem, Ut
NeXTmail preferred, but ONLY at my REAL email address: nevin@dtint.dtint.com

-- 
---
root	                               root@dtint.dtint.com
Digital Technology Int.                (801)226-2984	
500 W. 1200 South, Orem UT, 84057      FAX (801) 226-8438
From: grant@Manticore.COM (Grant J. Munsey)
Newsgroups: comp.sys.next.programmer
Subject: Compositing with alpha
Date: 20 Nov 92 23:26:10 GMT
Reply-To: grant@Manticore.COM

Anyone know what the formula is for determining the value of a pixel
when a color is composited into it. I'm talking about the case where
both pixels have rgb and alpha channels. I understand how to do the
color components but I'm stumped on what the final alpha value is. An
example take a color red with .5 alpha {1,0,0,.5} and composite it into
a pixel with gray and .2 alpha {.5,.5,.5,.2} what is the result {?,?,?,?}.
----
Grant Munsey, Mainticore, Inc. (408)252-1135
grant@Manticore.COM,  uunet!ub-gate!gouche!grant   NeXTMail ok.
From: dillon@overload.Berkeley.CA.US (Matthew Dillon)
Newsgroups: comp.sys.next.programmer
Subject: Re:  zombies (was Re: What does a task with priority -1 mean?)
Distribution: usa
Date: 22 Nov 92 11:20:16 PST
Organization: Not an Organization

In article <74594@hydra.gatech.EDU> cc100aa@xray.gatech.edu (Ray Spalding) writes:
>To avoid zombies, a UNIX process doing a fork (a parent process)
>must reap it's child(ren).  This is done by some varient of the
>wait(2) system call, and it may be helpful to install a SIGCHLD
>handler.  The man pages seem to imply that wait() is an optional
>feature, but failure to call it will result in a zombie.
>
>It sounds like Terminal is not doing this properly.  The Subprocess
>example does not seem to do this, either.

    If the parent process exits any unreaped zombies are supposed to go
    away.  Therefore, logging out *should* fix the problem.

    If it doesn't, it's a bug.  Another problem that I've found... you
    can't kill a process that is blocked in device-open (e.g. blocked on a
    dialup tty).  That is definitely a bug, when you kill a process (kill
    -9 pid) it's supposed to die, period.

					-Matt

>Most UNIXes I'm familiar with report zombies as <defunct>, but
>Mach apparently doesn't, if what's been reported here is correct.
>Also, on other UNIXes, killing them (from root) is no problem.
>
>--
>Ray Spalding, Office of Information Technology
>Georgia Institute of Technology, Atlanta Georgia, 30332-0715
>Internet: ray.spalding@oit.gatech.edu (NeXT Mail accepted)

--

    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
From: fosdal@phenxm.physics.wisc.edu
Newsgroups: comp.sys.next.programmer
Subject: accessing NetInfo from a c program
Date: 22 Nov 92 22:58:08 GMT
Reply-To: fosdal@phenxm.physics.wisc.edu
Organization: U of Wisconsin Madison - Computer Sciences

Are there any examples of how to use the routines described in
<netinfo/ni.h> ?  I am having difficulty implementing them...
--
Steven R. Fosdal      1150 University Ave, Madison WI 53706
NeXT System           Phone: (608)262-8947  Fax: (608)262-8628
Administration       fosdal@phenxm.physics.wisc.edu (NeXT mail o.k.)