HDTenEightyP/NetNews huggingface dataset:
From: prim!dave@germany.eu.net (Dave Griffiths)
Newsgroups: comp.sys.next.programmer
Subject: Bitmap Wizard
Date: 31 Jul 92 16:18:45 GMT
Organization: Primitive Software Ltd.

I'm posting this for a friend:


Hi there!

I am having a problem with reading and writing bitmap images, and
thought I would poll the assembled gurus out there.

Some background:

I am writing a Pinball game which has a TIFF file background onto
which objects such as flippers, balls, bumpers and lights are
composited.  These objects are initially drawn into NXImages and
then composited where needed onto the view containing the background.

I need to do "hit detection" to determine when the ball has hit an
object, and the fastest and easiest way of doing that appears to be to
have a "shadow" pinball table onto which I draw shadows of things that
the ball can hit.  The background of this shadow table is white, and
walls (which balls just bounce off) are light grey.  Reactive objects
like bumpers and flippers are dark grey.  Whenever I draw an object on
the table (say redrawing a flipped flipper) I redraw its shadow (a
simple dark grey outline) on the shadow table.  Thus whenever I move
the ball(s) I read from the point on the shadow table just ahead of
them, and if it is a wall I do a bounce, if it is a flipper etc. (dark
grey) I work out which object it is, then send a message to that
object saying it has been hit etc.

So what I am saying is that I need to be able to create a bitmap which
I can composite onto, and from which I can read pixel values, very
very fast.  Reading pixel values fast means I need to know where in
memory the bitmap is stored.

Now, to use the NeXT composite methods I need to use NXImages or
Views.  If I want to alter a bitmap image it MUST be an
NXCachedImageRep because if I try to alter a NXBitmapImageRep it just
changes a cached copy, and seeing as I don't know where the cached
copy is, I can't read pixels back from it.  Also, with
NXCachedImageReps I cannot find out where the bitmap is stored in
memory (I can get the offscreen window it is stored in).

Help, I don't know what to do; I can lockFocus on the
NXCachedImageRep, and copy the bit into a newly allocated
NXBitmapImageRep, get the address of *that* bitmap and read the pixel,
but that takes forever.  Has anyone (Ali Ozer?) got any ideas?

Thanks in advance,

Tim Bissel.

PS.  This is being posted for me by a friend, but you can reply to him,
     post replies or try mailing me at ...unido!portland!tim
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:27:21 GMT

In article <1992Jul27.132231.19873@monu6.cc.monash.edu.au>  
ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson) writes:
> I have a form and one of the formCells connected to a validateField  
method. I have a number of buttons which are enabled only if the fields  
are valid.  When I type in the formcell (not pressing return) or click  
into another cell or even _OUTSIDE_ the form the action is not sent.  
WHY!!!!!.
>
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: nader@bogart (Nader Sahyouni)
Subject: Re: Formcell behaviour
Reply-To: xns@nwu.edu
Organization: Northwestern University, Evanston, Illinois, USA
Date: Mon, 27 Jul 1992 14:53:29 GMT

In article <1992Jul27.132231.19873@monu6.cc.monash.edu.au>  
ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson) writes:
> The rtf says this.
> 
> FormCell
> 
> 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.
> 
> I have a form and one of the formCells connected to a validateField method. I  
>have a number of buttons which are enabled only if the fields are valid.  When  
>I type in the formcell (not pressing return) or click into another cell or  
>even _OUTSIDE_ the form the action is not sent. WHY!!!!!.
> 
> When I press return the action is sent as it should be.
> 
> Am I missing something here?

I am curious about this as well. Please post responses. If users are entering
info into a number of text fields and never hit return, it will look to them
as if all their data entry is completed. Problem is the fields will never
even have  been read by the program because nothing has caused the  
'validateField' method mentioned above to run.

Nader Sahyouni
Northwestern Univ. Med. School
xns@nwu.edu
Newsgroups: comp.sys.next.programmer
From: burchard@horizon.math.utah.edu (Paul Burchard)
Subject: dynamic parsers?
Organization: University of Utah Computer Center
Date: Tue, 28 Jul 92 10:19:19 GMT

Anyone know of any decent dynamic parsers out there on the net?  (By "dynamic"  
I mean that grammar rules can be added while the parser is running.)

It seems that the bison source could be hacked up to do this, but that's a  
hefty wheel to reinvent and I'm hoping it's already been done...

The story behind this is that I'm in need of a decent Parser object, and stuff  
like yacc just doesn't lend itself well to OOP.  Yacc is really annoying in  
this regard.  With bison, you can at least subclass your Parser to use a  
different language spec (since there's a flag to alter the names of all those  
annoying global yyvariables).  But you can't incrementally add new rules in  
your subclasses; you have to start the subclass grammar from scratch.

--
--------------------------------------------------------------------
Paul Burchard	<burchard@math.utah.edu>
``I'm still learning how to count backwards from infinity...''
--------------------------------------------------------------------
Newsgroups: comp.sys.next.programmer
From: nikos@cs.cornell.edu (Nikos P. Pitsianis)
Subject: ??? -lplot ???
Organization: Cornell University, CS Dept., Ithaca, NY
Date: Fri, 31 Jul 1992 00:42:16 GMT

Hi Net,
I'm trying to load-link code that calls 
openpl, closepl, line, erase etc.
What is the correct library to link and where can I find it?
man page on plot suggests to use -lplot, -l4014 and others but none
of them seems to be present.
Please, let me know, by e-mail.

Thanks
-- Nikos

Xref: sparky comp.sys.next.programmer:5319 comp.sys.next.software:904 comp.sys.next:204
From: sl05r@cc.usu.edu
Newsgroups: comp.sys.next.programmer,comp.sys.next.software,comp.sys.next
Subject: Information on Barcode packages requested
Date: 29 Jul 92 10:11:53 MDT
Organization: Utah State University


In the August 1992 NeXTWorld Extra, in the "News in brief" section, they
mention a couple of programs for using barcodes.  I am gearing up to putting
together a mission critical app. (my first NeXT app.) that will be using
barcodes.  The article mentions d'Art Software of Germany, and Hot Software of
Cambridge, Massachusetts, but it doesn't say how to get in touch with them.

Does anyone have phone numbers, addresses (regular and e-mail) for contacting
either of these companies?  And does anyone have any more information on using
barcodes and barcode readers in apps?  Any information would be greatly
appreciated.

John Zollinger
sl05r@cc.usu.edu
(801) 752-9175 ext. 250   (Work phone, days)
From: hans@dev01 (Hans Peter Geiser)
Newsgroups: comp.sys.next.programmer
Subject: Re: What if two objects in same nib file ... need help
Date: 31 Jul 92 07:26:00 GMT

In article <1992Jul29.205559.25532@aio.jsc.nasa.gov> bill@epnxt.jsc.nasa.gov  
writes:
> If one has two objects in the same nib file (one nib file for the  
> program), how does one know which will execute on execution of the  
> program?
> 

This depends on your code! (-:. The first place where you can force objects to  
react are the delegate-methods of your application-object's delegate  
appWillInit: and appDidInit:. These messages are sent if the applications  
delegate has implemented the appropriate methods. Later it depends on the kind  
of events the WindowServer get, which objects are 'messaged'. 

Hans - Peter Geiser
Newsgroups: comp.sys.next.programmer
From: qureshi@unixhub.slac.stanford.edu ( "For deposit only")
Subject: Re: Problems implementing services and new problem
Reply-To: cooldude@elaine43.stanford.edu
Organization: DSO, Stanford University
Date: Wed, 29 Jul 92 21:08:10 GMT

In article <1992Jul29.205038.25257@magnus.acs.ohio-state.edu>  
phayes@magnus.acs.ohio-state.edu (Patrick W Hayes) writes:
> 
> 	A potential problem could be that you changed your program while
> it was in the Apps directory.  I have noticed that the Workspace Manager  
caches
> the services you provide so it doesn't have to check every time you log in.   
So
> to provide new or different services I now remove my program from the Apps 
> directory, log out, log in, install it again, log out, and log in again.  It 
> took me about six hours to figure that one out.
> 	My problem is with dynamic services.  I create the file in
>  ~/.NeXT/services with my program name and same format as the one that I 
> compile with, call NXUpdateDynamicServices() and I don't see my new services.
> I'm already the servicesDelegate, so that isn't it.  I even noticed that a  
new
> service from Digital Librarian won't appear in Edit's Services menu until you
> quit and restart and open a document, but my own still does not show up.  Any
> help greatly appreciated. 

Type make_services in a Terminal Window.  It forces the WorkSpaceManager to  
reread the services.

Imran
Newsgroups: comp.sys.next.programmer
From: billb@fnbc.com (Bill Burcham)
Subject: Custom NXStream Example Needed
Keywords: stream,custom,NXStream,difficult,tedious,baroque
Organization: First National Bank Of Chicago, Chicago IL, USA
Date: Thu, 30 Jul 92 17:59:46 GMT

Has anyone written a custom NXStream.  I would really appreciate a code  
example.

Thanks,
---
+--------------------------------+----------------------------------+
|          Bill Burcham          | "The real world is the place     |
|     Protector of the Realm     |  between your toilet at home and |
| First National Bank of Chicago |  your toilet at work."           |
|    billb@fnbc.com  (NeXTmail)  |                                  |
+--------------------------------+----------------------------------+
Newsgroups: comp.sys.next.programmer
From: andrew@cubetech.com (Andrew Loewenstern)
Subject: c.s.n.programmer FAQ
Organization: Cube Technologies, Inc.
Date: Wed, 29 Jul 1992 18:56:17 GMT


We need a FAQ for this group since many poeple are repeating questions
that have been recently answered (many times...).  The recent
tech-support policy change at NeXT will only make this worse.

So, if you get tired of seeing a particular question being asked,
write it up in a NeXTanswers format and send it to me
(andrew@cubetech.com).  I'll compile them and post ASCII versions each
week.  If poeple are interested, I'll put indexed RTF versions on the
archives as well.


thanks,
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
Newsgroups: comp.sys.next.programmer
From: mmelling @Trirex.com(Michael Mellinger)
Subject: Re: Lint for Next? (SUMMARY)
Organization: Trirex Systems Inc.
Date: Wed, 29 Jul 1992 02:07:12 GMT

In article <1992Jul24.032523.10457@newsgate.sps.mot.com>  
gregf@shaman.sps.mot.com (Greg Ferguson) writes:
> Well, it appears that a true lint doesn't exist. Here's the notes  
that've
> come in today. It's unanimous for "cc -Wall file.c", for better or  
worse.
> 
> Maybe release 3.0...

Turn optimization on too (-O) to get more information.  The dataflow  
analysis stage gives your more information about unreachable code, etc.

This question should be in the FAQ list.  It gets asked several times a  
year.

-Mike
From: mcconnap@NeXTwork.Rose-Hulman.Edu (Andy McConnell)
Newsgroups: comp.sys.next.programmer
Subject: Animation suggestions wanted
Date: 27 Jul 92 14:36:41 GMT
Organization: Rose-Hulman Institute of Technology


I'm looking for suggestions on how to simulate flowing fluids.  We need to  
show fluid flowing in a pipe.  I've seen different methods (on the PC for  
example) of cycling colors to simulate motion, but I'm sure there's a much  
better way.

Thanks!

--
Andy McConnell                   mcconnap@nextwork.rose-hulman.edu
   (812) - 877 - 8809            Fluid Science Learning Center Developer
                                 Rose-Hulman Institute Of Technology
   
Class of 1993 - CS BS - RA - AFROTC - AAS - WMHD-FM 
Newsgroups: comp.sys.next.programmer
From: eps@futon.SFSU.EDU (Eric P. Scott)
Subject: Re: man page for "table" system call?
Reply-To: eps@cs.sfsu.edu
Organization: San Francisco State University
Date: Wed, 22 Jul 1992 07:12:10 GMT

In article <63894@hydra.gatech.EDU> roy@prism.gatech.EDU
	(Roy Mongiovi) writes:
>Where do I find the documentation for table(2)?

NeXTanswers' hardware.422 and whatever you can glean from the
#include files (and, of course, any examples you just happen to
find lying around, such as

#include <stdio.h>
#include <sys/types.h>
#include <sys/table.h>
main() {
	struct tbl_loadavg avg;

	(void)table(TBL_LOADAVG, 0, (caddr_t)&avg, 1, sizeof avg);
	(void)printf("load average:%5.2f,%5.2f,%5.2f\n",
		(double)avg.tl_avenrun[0]/(double)avg.tl_lscale,
		(double)avg.tl_avenrun[1]/(double)avg.tl_lscale,
		(double)avg.tl_avenrun[2]/(double)avg.tl_lscale);
	exit(0);
}

which I posted a few weeks ago, or the "locate the loginwindow
process" code in iwf.)

					-=EPS=-
From: simsong (Simson L. Garfinkel)
Newsgroups: comp.sys.next.programmer
Subject: Re: Destroying Zones
Date: 30 Jul 92 11:28:24 GMT
Reply-To: simsong@next.cambridge.ma.us
Organization: Simson Garfinkel and Associates, Inc.

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.

You must take the windows off the window list before you destroy them.  You can  
do this by accessing the window list directly....
-- 

................................................................simson
Organization: Penn State University
Date: Thu, 23 Jul 1992 16:35:38 EDT
From: <MKK2@psuvm.psu.edu>
Newsgroups: comp.sys.next.programmer
Subject: Garbled display in ScrollView

I [theText replaceSel:aString] text into a Text that is in a ScrollView.
It is all pretty vanilla stuff.

But recently (as I've added some other features to the program) the
displayed text has started to get garbled when I scroll.  It is even
an intermittant problem---I scroll, and get garble (missing characters,
what looks like overprinting, unexpected wrap) but when I scroll it off
and then on again, I get no or different garble.

So far as I know, I am not doing anything "clever," so this behavior
surprises me.  Any hints, clues, or suggestions welcome.
From: prim!dave@germany.eu.net (Dave Griffiths)
Newsgroups: comp.sys.next.programmer
Subject: Tracing method calls in gdb
Date: 31 Jul 92 23:59:37 GMT
Organization: Primitive Software Ltd.

I find that quite often I would like to trace the methods that are being
called during execution of a program. Has anybody got a gdb script that
will do this? Presumably it's possible to put a break into something like
objc_msgSend() that will print the object name and method and then continue?

Thanks for any help,

Dave Griffiths
From: cc100aa@xray.gatech.edu (Ray Spalding)
Newsgroups: comp.sys.next.programmer
Subject: Re: ScollView Strangesness ?
Date: 28 Jul 92 17:30:57 GMT
Organization: Georgia Institute of Technology

In article <1992Jul28.162738.15249@tamsun.tamu.edu> David-Hess@tamu.edu writes:
>In article <64476@hydra.gatech.EDU> cc100aa@xray.gatech.edu (Ray Spalding)  
>writes:
>>         if (rectCount == 1) NXRectClip(rects);
>>         else NXRectClipList(rects+1,2);
>I believe the Concepts manual says that if rectCount == 2 then the two  
>rectangles will be disjoint (e.g. due to a diagonal scroll). In this case  
>then the above code would clip out everything and no redrawing would occur.  
>Fortunately, this case usually only occurs under program control so this  
>rarely happens.

Yes, I believe you are correct -- my code doesn't appear to work when
rectCount != 1.  (In which case it would be 3, I suppose, not 2.)











-- 
Ray Spalding, Office of Information Technology
Georgia Institute of Technology, Atlanta Georgia, 30332-0715
Internet: ray.spalding@oit.gatech.edu (NeXT Mail accepted)
Newsgroups: comp.sys.next.programmer
From: vesper@kong.gsfc.nasa.gov (Greg Vesper - RMS)
Subject: Need help with DBModeler App
Reply-To: vesper@kong.gsfc.nasa.gov
Organization: Goddard Space Flight Center
Date: Wed, 29 Jul 92 17:02:24 GMT

I've got 3.0 PreRelease 2 and I'm trying to do some prototyping with DBKit.   
Unfortunately, the DBModeler App won't perform.  I can't get past the Oracle  
authentication panel.  I've got several ORACLE servers that I'd like DBModeler  
to talk to, but the authentication process never even gets onto the wire - i.e.  
no packets leave my machine in an attempt to connect with an ORACLE server.

All my other networking is fine - NFS, print spooling, telnet, rlgoin...

I can open a Terminal session to the ORACLE servers I'm trying to connect to.
Netinfo knows about the ORACLE servers.
But DBModeler gets nowhere.

I've tried setting up my machine to run within a Netinfo network and  
independent of a Netinfo network and still no go.

I've had other machines running 3.0 successfully connect to my ORACLE servers  
via BDModeler - so it seems like a local problem.

Online docs for DBModeler are lacking.

Is there something I need to set up to get DBModeler going?

Any help in this regard would be greatly appreciated,

-Greg.
--
Greg Vesper (vesper@kong.gsfc.nasa.gov)

"Now satan is a liar, and he wants to make us think,
 that we are paupers, when he knows himself we're children of the King.
 So lift up the mighty shield of faith for the battle must be won,
 We know that Jesus Christ is risen so the work's already done."
Newsgroups: comp.sys.next.programmer
From: eps@futon.SFSU.EDU (Eric P. Scott)
Subject: Re: Keyboard input
Reply-To: eps@cs.sfsu.edu
Organization: San Francisco State University
Date: Wed, 22 Jul 1992 07:45:41 GMT

In article <1992Jul21.191759.3408@news2.cis.umn.edu>
	rowley@leghorn.cs.umn.edu. (Tim Rowley) writes:
>I want keyboard events from the main window of my application.  Sounds simple  
>enough, but I'm having problems.
>
>I have a view with the following things overridden: keyDown and mouseDown.

>This was slightly more successful in that I now get the mouseDown events, but
>pressing a key just gives a miserable "boink."

Does your View implement an acceptsFirstResponder method that
returns YES?  [Read the description of acceptsFirstResponder
(Responder) in the NeXTstep Reference.]

Also, have you done [the equivalent of]

	[[NXApp mainWindow] makeFirstResponder:thatView]
?

					-=EPS=-
From: william@moica.berkeley.edu (William E. Grosso)
Newsgroups: comp.sys.next.programmer
Subject: ScollView Strangesness ?
Keywords: what is going wrong ?
Date: 27 Jul 92 20:08:32 GMT
Organization: University of California, Berkeley
NNTP-Posting-Host: moica.berkeley.edu




I have a strange prboblem with a ScrollView. It seems to 
lose branches of the view hierarchy when scrolling 
(e.g. a subview and all it's descendants will occasionally
just diappear). Sometimes they reappear if I continue scrolling.

Has this happened to anybody else before ? Any clues as to what
is going wrong ?

Thanks,


Bill Grosso
From: aoml@enh.nist.gov
Newsgroups: comp.sys.next.programmer
Subject: NXColorWell
Date: 24 Jul 92 16:08:06 GMT
Organization: NIST

I am using Next Step 2.?, not the new version.  It seems to me that the color
well class is very, very rudimentary.  Not even debugged.  Maybe someone can
help me with this problem.  I am trying to create a ColorWell that doesn't have
a border.  Pretty simple, except that there is no inspector for the Well.  So
I subclassed the NXColorWell, and added the following line to my initFrame::
method:
[self setBorder:NO];
The method is documented, but I get a message saying that Color Well does not
respond to that message.  And, sure enough, it is not in the Class Summary,
just the class description.  What is going on here?

Has anyone else created a fixed version?  I would do it myself, but I can not
find any variables for whether the border is on or not.  Please help!

Kevin
Newsgroups: comp.sys.next.programmer
From: moose@svcdudes.com
Subject: Re: Garbled display in ScrollView
Reply-To: moose@svcdudes.com
Organization: Software Ventures, Inc.
Distribution: na
Date: Mon, 27 Jul 92 16:51:23 GMT

In article <92205.163538MKK2@psuvm.psu.edu> <MKK2@psuvm.psu.edu> writes:
> I [theText replaceSel:aString] text into a Text that is in a ScrollView.
> It is all pretty vanilla stuff.
> 
> But recently (as I've added some other features to the program) the
> displayed text has started to get garbled when I scroll.  It is even
> an intermittant problem---I scroll, and get garble (missing characters,
> what looks like overprinting, unexpected wrap) but when I scroll it off
> and then on again, I get no or different garble.

Sounds like you trashed memory.  Have you tried using MallocDebugger?


--
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: snmeller@cip.informatik.uni-erlangen.de (Sebastian Meller)
Subject: fast 2-D animations ??
Organization: Student Pool, CSD, University of Erlangen, Germany
Date: Thu, 23 Jul 1992 17:00:08 GMT

Hello,
I'm working on a NeXT cube and I try to write a program to
animate little figures on the screen, move, rotate, rescale them.
Isn't it possible to rotate 12 stars on the screen in real time ??
I just don't know how to do it. All I've tried (using pswrap
routines, compositing NXImages into a view) is much too slow.
Please tell me the tricks that I don't know.

Thanks,
   Sebastian
---
Sebastian Meller:snmeller@cip.informatik.uni-erlangen.de
Informatik-Student 
Newsgroups: comp.sys.next.programmer