HDTenEightyP/NetNews huggingface dataset:
From: julie@next.com (Julie Zelenski)
Newsgroups: comp.sys.next.programmer
Subject: Developer Support "core dump":  NXImage question
Keywords: NXImage seg fault
Date: 29 Sep 92 19:25:12 GMT
Reply-To: julie@next.com


A developer recently asked, 

"I have encountered difficulty in working with the ButtonCell class and  
(firmly) believe it may be a bug in NeXT's appkit.

I have set my ButtonCell to display a certain image using setIcon:.  Later  
I will change the image and I want to free the original image.  No problem  
occurs at the time you free the image, but the behavior of the program is  
unpredictable after that point and it is prone to crashing upon sending  
the display message to the view containing my ButtonCell.  The backtrace  
ends with a failed call to objc_msgSend().

There is a very remote chance that this is not an appkit bug and that it  
may be a logic error in my code.  However, I have traced this bug for a  
couple of weeks and have simplified my program dramatically in an effort  
to remove it.  The only thing that worked was to remove the lines where I  
free the image.

Have you had any reports on this problem in the past?"


Your trusty developer support engineer often starts with the docs.  The  
method description for setIcon: in ButtonCell pointed her to the method  
findImageNamed: in NXImage class.  The intro to NXImage describes how it  
manages a class database of named images.  NXImage is a smart enough beast  
to create only one instance of a named image and share it across the  
application. 
Her best guess at this problem was that the image being freed was a shared  
image.  Although his button cell was no longer needed it, some other  
object still was using it.  To test her theory, she wrote a small example  
with two buttons.  Both buttons used the same image.  She set the image to  
nil in one of the buttons and free its image.  Clicking on the other  
button crashed with the following backtrace:

Program generated(1): Memory access exception on address 0x20 (protection  
failure).

#0  0x50069be in objc_msgSend ()
#1  0x6012e16 in - [ButtonCell _getIconInfo:]
#2  0x6015dc6 in - [ButtonCell _getIconRect:flipped:]
#3  0x60161d4 in - [ButtonCell _getIconRect:andTitleRect:flipped:]
#4  0x6015480 in - [ButtonCell drawInside:inView:]
#5  0x60167c2 in - [ButtonCell drawSelf:inView:]
#6  0x6028422 in - [ButtonCell highlight:inView:lit:]
#7  0x60309ca in - [Control mouseDown:]
#8  0x60190aa in - [Window sendEvent:]
#9  0x6014362 in - [Application sendEvent:]
#10 0x6036efe in - [Application run]
#11 0x31fa in main (argc=1, argv=(char **) 0x3fffcd4) (test_main.m line  
11)

Just like the backtrace the developer was experiencing.  

What's the moral of the story?  Be careful with named images.  If you name  
an NXImage with setName: or retrieve it by way of findImageNamed:, be sure  
it isn't use by someone else if you free it.  

Julie Zelenski		julie@next.com
Developer Support
Newsgroups: comp.sys.next.programmer
From: zulu!errol (Errol Ginsberg)
Subject: Tab stop problems in the text object
Keywords: Tab stops, text object
Organization: Ridgeback Solutions
Date: Fri, 25 Sep 1992 17:09:46 GMT

We are wondering if anyone has had any success setting tabstops in the  
Text object.  A few months back, we saw a similar request for help, but  
never noticed a response.  It seems that setParaStyle works, but whenever  
we add more text to our monoFont Text object, the tabs disappear, forcing  
us to call setParaStyle again.  The task in question is the periodic  
reporting of some data in a Window;  after a period of time, when there is  
quite a bit of text, the need to add the tabs after each new text addition  
(and the subsequent automatic reformatting of all the text) bogs the whole  
application down horribly.  

Any information would be appreciated.



--
Regards,

Errol Ginsberg
Ridgeback Solutions
errol@ridgeback.com
Tel: 310/456-6094
-- 
Regards,

Errol Ginsberg
President
Newsgroups: comp.sys.next.programmer
From: mueller@n1 (Robert Mueller)
Subject: window's printPSCode - method
Keywords:  printPSCode
Organization: Johannes Gutenberg Universitaet Mainz
Date: Wed, 30 Sep 1992 11:59:40 GMT

Is there a bug in window's printPSCode-method?

Window's printPSCode method routine does not print subclasses of "Form"  
correctly, although displaying these subclasses on screen works fine!!!


Details:
I've implemented a subclass of "Form", called TheMPOForm (this subclass is also  
available on a loadable palette). TheMPOForm-Objects organize Objects of the  
class TheMPOCell, which is a subclass of FormCell. No graphical attributes  
werde added to TheMPOForm, it's s sense is just to allow better input-checking  
(by overwriting Cells method "isEntryAcceptable" in TheMPOCell). On screen,   
TheMPOForm objects behave exactly like Form-Objects, but printing a Window with  
TheMPO-Form objects by using the printPSCode method leads to the catastrophy:  
Some TheMPOForm-objects are printed, while others are ignored; sometimes the  
whole TheMPOForm is rotated.

This are the TheMPOForm routines, which deal with drawing and displaying,  
perhaps you can find a bug (but why does displaying on screen work fine?):

- initFrame:(NXRect *)frameRect
{ 
    id firstCell;
           	
    [super initFrame:frameRect];
    [self setEntryWidth:150];        
    firstCell = [self insertEntry: "Input" at: 0];
    [self sizeToFit];

   return self;  
}

- drawSelf:(const NXRect *)rects :(int)rectCount
{
    int  j;
   
    numOfCells = [self cellCount];   
    for (j = 0; j < numOfCells; j++)
     [self drawCellAt:j];
  
    return self;
}

Perhaps I also have to overwrite the copy-Routine!!??

Thank in advance for your answer!
From: alex@cs.umd.edu (Alex Blakemore)
Newsgroups: comp.sys.next.programmer
Subject: Re: isKindOf: and IsKindOfClassNamed: problems
Date: 1 Oct 92 03:33:38 GMT
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742

I wrote
> >the difference between the IsKindOf and IsMemberOf methods (and their cousins
> >that take class names instead of class objects as args) is how they handle subclasses.

Tim McClarren wrote:
> That's not what was being discussed, nor is it what you said in your former post.
> I was already well aware of the differences between the "isKindOf:" and "isMemberOf:" methods.

You're right, I read the original post wrong.
Sorry to send you to the release notes and other docs -
only to have them not solve the problem.

At a slower glance, it sure looks like a bug,

>   (gdb) print [aClassObject isKindOf:[Process class]]
>   $6 = 0
>   (gdb) print [aClassObject isKindOfClassNamed:"Process"]
>   $7 = 1

-- 
---------------------------------------------------
Alex Blakemore alex@cs.umd.edu   NeXT mail accepted
Newsgroups: comp.sys.next.programmer
From: jgg@proforma.com (J. G. Gregory)
Subject: 3D rendering slow (the first time) after selecting 3D shapes
Keywords: 3Dkit
Organization: Pro Forma
Date: Sat, 26 Sep 1992 16:54:44 GMT

I'm encountering a performance problem with [N3DCamera display] used in  
conjunction with [N3DCamera selectShapesIn:].  Any help or advice would be  
appreciated.

After using [N3DCamera selectShapesIn:] to pick 3D objects,  the first time I  
redisplay the camera  (using [N3DCamera display],) the system spins for several  
seconds before displaying the objects.  If I display again, the redisplay is  
instantaneous.  I only get this initial delay after calling selectShapesIn: ;   
anything else that I call in between redisplays doesn't cause this delay.  The  
delay varies somewhat with the screen size of the Camera view, but is awkward  
even in a small view.

Is there something I can cache or lock down to prevent this delay?  I have  
called [View allocGState] already, if that's relevant, but to no avail.

Thanks in advance,
--J Gregory
From: strauss@Aero.org (Daryll Strauss)
Newsgroups: comp.sys.next.programmer
Subject: Ports and the net name server
Date: 2 Oct 1992 17:46:53 GMT
Organization: The Aerospace Corporation
Distribution: world
NNTP-Posting-Host: armadillo.aero.org

I've got a few questions about mach/next ports and their interactions
with the netname server, that I'm hoping someone out there in netland
can help me with. I want to make sure I'm not missing something obvious.

First, is there a way to store "persistent" information about a port
other than through the net name server? For example, I have an
application that wants to set up a private port and pass that along to
other applications (probably via the other applications publicly
registered port) Is there some set of information that it can pass to a
second application so that the second application can write the
information to disk, exit, be restarted some time later, reread the
information off the disk and establish a connection to that private
port? I get the impression that the answer is no. Ports and access
rights are stored in the kernel and when the application quits they are
gone forever. Is that correct?

Second, is there a way to ask the net name server for all the registered
ports that it knows about? Again, I think the answer is no. You have to
know the port you are asking for in advance. This provides a potential
solution to my first question. If my private port is registered with the
net name server with a randomly generated name, then it can pass that
randomly generated name to the other applications and they can use that
to reestablish the connection. That all works if I can be sure that
someone can't query the net name server and find my random name.

Finally, is there is a way to request all the ports on the local net
that match a certain name? Using the "*" parameter to one of the net
name lookup routines will give me one port (the first to answer the
broadcast request I would guess) Is there a form that gives me all the
ports that answer? If not, why not? Are the broadcasts unreliable? Is
there a better way?

						Thanks in advance,
							- |Daryll

-- 
Daryll Strauss          			     f	The Aerospace Corp.
strauss@aero.org		      		     n	Mail Stop: M1-102
...!uunet!aero.org!strauss			     o	P.O. Box 92957
NeXTMail: daryll@harlot.rb.ca.us                     r  Los Angeles, Ca. 90009
"It's my reality and I'll warp it if I want to!"     d	(213) 336-9358
Organization: University of Illinois at Chicago
Date: Monday, 5 Oct 1992 17:05:34 CDT
From: <U30726@uicvm.uic.edu>
Newsgroups: comp.sys.next.programmer
Subject: Printing from SoftPc

Hello,

We have a HP Laserjet III (non-postscript) connected locally to a
Next r 3.0. We are able to print regular ascii files with no problems.
The problem is with files generated by applications, for example,
WordPerfect that are launched within SoftPc. The printer settings are chosen
properly within WordPerfect i.e. printer is selected to be HP Laserjet III
The ouput from the printer is garbage. WE think the NExt is removing the ESC
and other control characters. Is there a way of getting around this?
Is there some way of making the NexT more passive? Note that if we launch
WordPerfect on a DOS 386 and print to the same printer, it works fine!
Thanks in Adance

rilluri@is.rpslmc.edu
 or
u30276@uicvm.uic.edu


Newsgroups: comp.sys.next.programmer
From: ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson)
Subject: help quickly needed
Summary: help quickly needed
Organization: Monash University, Caulfield Campus
Date: Thu, 1 Oct 1992 19:16:40 GMT


My App doesn't compile under 3.0, why?

cc -g -O -Wall    -c DatabaseManager.m -o obj/DatabaseManager.o
cc -g -O -Wall    -c DBEmployee.m -o obj/DBEmployee.o
cc -g -O -Wall    -c DBRoom.m -o obj/DBRoom.o
cc -g -O -Wall    -c Employee.m -o obj/Employee.o
cc -g -O -Wall    -c EmployeePanel.m -o obj/EmployeePanel.o
/NextDeveloper/2.0CompatibleHeaders/defaults.h:1: warning:  Compatibility header file included - use <defaults/defaults.h>
/NextDeveloper/2.0CompatibleHeaders/mach.h:1: warning:  Compatibility header file included, use <mach/mach.h>
EmployeePanel.m: In method `registerWindow'
EmployeePanel.m:514: warning: cannot find method.
EmployeePanel.m:514: warning: return type for `registerWindow:toPort:' defaults to id
EmployeePanel.m: In method `unregisterWindow'
EmployeePanel.m:529: warning: cannot find method.
EmployeePanel.m:529: warning: return type for `unregisterWindow:' defaults to id
cc -g -O -Wall    -c EmployeesBrowser.m -o obj/EmployeesBrowser.o
cc -g -O -Wall    -c EmpRoomBrowser.m -o obj/EmpRoomBrowser.o
cc -g -O -Wall    -c ImageView.m -o obj/ImageView.o
cc -g -O -Wall    -c ImageWellView.m -o obj/ImageWellView.o
cc -g -O -Wall    -c InfoPanel.m -o obj/InfoPanel.o
/NextDeveloper/2.0CompatibleHeaders/defaults.h:1: warning:  Compatibility header file included - use <defaults/defaults.h>
/NextDeveloper/2.0CompatibleHeaders/mach.h:1: warning:  Compatibility header file included, use <mach/mach.h>
cc -g -O -Wall    -c Localization.m -o obj/Localization.o
Localization.m:5: header file 'appkit/defaults.h' not found
/NextDeveloper/2.0CompatibleHeaders/defaults.h:1: warning:  Compatibility header file included - use <defaults/defaults.h>
*** Exit 1
Stop.
*** Exit 1
Stop.
From: charuhas@virtual4.harvard.edu (Thomas Charuhas)
Newsgroups: comp.sys.next.programmer
Subject: Centerline vs NeXT
Date: 5 Oct 92 20:27:15 GMT
Article-I.D.: das.1992Oct5.202715.29163
Organization: Aiken Computation Lab, Harvard University

OK, all my comerades-in-NeXT,
	If you have any experience using Centerline's OI/ViewCenter,
or know anybody that does, then I need your help. I would like to
know how easy CenterLine's software is to use, how quickly one can
come up with finished products involving pretty fancy graphical manipulation
and most importantly, how it compares to NeXTstep.
For this to pan out I need specifics if you have them. If there
is enough concrete evidence to merit buying NeXT's to do the job
(We are loaded with SUN's) then we will be purchasing some color
Turbo's.
Thank you very much. Please e-mail me at charuhas@das.harvard.edu
Newsgroups: comp.sys.next.programmer
From: jamast00@nx17.mik.uky.edu (john a mastrolia)
Subject: Help with C-News
Keywords: news
Organization: University Of Kentucky, Dept. of Math Sciences
Date: Tue, 6 Oct 1992 00:49:01 GMT

For those familiar with installing c-news!  I need some help/advice on  
installing c-news on my NeXTStation Turbo system.  I tried to execute the  
scripts (with the guidance of the Canada NUG .ps file) under both 2.2 and 3.0.   
Both reported the same problem in the second script file executed (not exact  
output):

putenv.c number of parameters did not match prototype.
Exit 1 *******
+ Stop

This .c file is included into the program at runtime because according to my  
installation guide, the NeXT does not have a putenv() function.  Any  
suggestions or help would be greatly appreciated.

Thanks in advance.


--
John A. Mastrolia		+1 606 257-2272
jamast00@mik.uky.edu		+1 606 257-6100
deepthought!outland!jmast@ms.uky.edu 
  University of Kentucky
  NeXT Mail enjoyed!
Newsgroups: comp.sys.next.programmer
From: jolly@next3.cis.uni-muenchen.de ()
Subject: what happend with the thread execution speed under 3.o ?
Keywords: thread, mach, operating system, os, kernel
Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
Date: Mon, 5 Oct 1992 08:45:41 GMT

I tried to execute a few simple programms under 3.o ( to discover if
the kernel has changed in the thread bug ), but it was impossible to
find that out, cause the cthread_detach slowed the system like a fork
 function. WHAT happend ????

					Jolly

post scriptum : did they forget to remove the #define DEBUG message ?
		*giggle*
From: hardy@golem.ps.uci.edu (Meinhard E. Mayer (Hardy))
Subject: Re: Slow OpenPanel under AFS?
In-reply-to: Lyle_Seaman@TRANSARC.COM's message of 25 Sep 92 22:33:21 GMT
Newsgroups: comp.sys.next.programmer
Organization: Department of Physics, UC Irvine, CA 92717-4575, USA
Date: 27 Sep 92 03:19:25 GMT

Could someone explain, for us "abbreviation-impaired" people, who may
have missed the original postings, what AFS means (I presume A... File
System, or is it just "a file system" ;-)) and what it is good for? 
--
Hardy 
-----
Meinhard E. Mayer,  Department of Physics, UC Irvine 
e-mail: hardy@golem.ps.uci.edu (preferred) or MMAYER@UCI.BITNET

Newsgroups: comp.sys.next.programmer
From: bmehlman@trirex.com(Ben Mehlman)
Subject: Re: Developer Camp Schedule Requested
Reply-To: bmehlman@trirex.com
Organization: Trirex Systems Inc.
Date: Sat, 26 Sep 1992 01:18:12 GMT

In article <1992Sep18.131017.58991@cc.usu.edu> sl05r@cc.usu.edu writes:
> Could someone please fax, email, etc. the latest list of developer camps  
that
> will be available in the next few months?  The dates, locations, costs,  
etc.
> would help me out a lot.  I have tried to get this information from NeXT
> several times, which resulted in the response of "We will fax those  
right out 
> to you", and me never getting anything.  Thanks...
> 
> John Zollinger
> sl05r@cc.usu.edu  (no NeXT mail please...yet ;-)

We run Dev Camp here at Trirex, in Westport CT.  We have one coming up  
next month.  NeXT runs the other camp in Redwood City.

Both camps are booked through the people at NeXT, so I can't help you  
directly.  But if you have major problems send mail to the head of our  
training center, Tom Affinito (taff@trirex.com).
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    \|/        Ben Mehlman                      Indigo..
   ^   ^       Trirex Systems Inc      
   #   #       bmehlman@trirex.com                   Indigoing..
     @
   \___/       >NeXTMail Welcome<                           Indigone.
Newsgroups: comp.sys.next.programmer
From: alexlehm@iti.informatik.th-darmstadt.de (Alexander Lehmann)
Subject: Indent converts =op assignments by default
Date: Tue, 29 Sep 1992 14:45:22 GMT
Organization: TH Darmstadt

Forgive me if this has been addressed before, but I visit this not fequently
enough to catch all infos.

I recently used indent to reformat some C code for debugging (which consited of
macros almost completely) and found a problem with indent.

As mentionend in the man-page, indent can convert (very) old style assignments
of the form var =op value into the usual form of var op= value. This is
controlled by a command swith -osa and -nosa to turn the feature on and off.
The man-page says that -nosa (i.e. no conversion) is the default, but apparently
-osa is used. This can be kind of tricky since a statement like var =-42;
would be converted into the different form without being noticed (no error).

To fix this, simply add -nosa to the ~/.indent.pro file.


				I hope this helps ... bye ... Alex
-- 
Alexander Lehmann                      | "Wopp"
alexlehm@iti.informatik.th-darmstadt.de|         -  ( THHGTTG Pt.3 )
From: jland@nwu.edu (John Landwehr)
Newsgroups: comp.sys.next.programmer
Subject: NeXT Job Opportunities
Keywords: NeXT job
Date: 4 Oct 92 21:08:18 GMT
Organization: Northwestern University, Evanston, Illinois, USA

Once again, my friend on the east coast has been bugging me about NeXT  
programmers.  It appears that there is a shortage, and companies are  
hiring left and right!  (sounds like they are paying well, too!)

Opportunities are available on the East coast, Texas, Illinois,  
Washington, England, and Europe.

All opportunities are on-site.

Minimum 6 months NeXT, Obj. C, and UNIX experience.

For more info, mail:
next@nwu.edu
Newsgroups: comp.sys.next.programmer
From: ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson)
Subject: Drag and Drop API problems
Summary: Drag and Drop API problems
Organization: Monash University, Caulfield Campus
Date: Sat, 3 Oct 1992 03:00:11 GMT

I am trying to get a view to accept a tiff from the workspace.

I have got it working using NXFilenamePboardType in that the little
squares come up when any type of file enters the boundry of the view
now what I want is for the squares to come up only if the file
is a tiff.  ie. NXTiffPboardType.

I have this.

- initFrame:(NXRect *)frameRect
{
	const char *const types[] = {NXTIFFPboardType};
    	[super initFrame:frameRect];
	[self registerForDraggedTypes:(const char *const*)&types count:1];
    	return self;
}

- (NXDragOperation)draggingEntered:(id <NXDraggingInfo>)sender
{
	Pasteboard *pboard;
	NXDragOperation sourceMask;
	dragOK = NO;
    
	sourceMask = [sender draggingSourceOperationMask];
	pboard = [sender draggingPasteboard];
	if (sourceMask & NX_DragOperationCopy) {
		if (IncludesType([pboard types], NXTIFFPboardType)) {
			dragOK = YES;
		}
	}
	if (sourceMask & NX_DragOperationCopy) {
		if (dragOK) return NX_DragOperationCopy;
	}
	return NX_DragOperationNone;
}


This doesn't work if I replace NXTIFFPboardType with NXFilenamePboardType
any file does get accepted.
From: monty@next1.acs.ohio-state.edu
Newsgroups: comp.sys.next.programmer
Subject: bringing up a send window in Mail with address and subject filled in
Date: 30 Sep 92 16:48:22 GMT
Article-I.D.: next1.9209301648.AA02661
Organization: The Ohio State University


        Does anyone know how to bring up a send window in mail with the 
address, subject, and message body text already filled in?  Is there a way
to specify files to include as attachments.  I could find nothing in 
the documentation about this, but I have seen other programs do it
and I would like to be able to also.

Thanks,

Monty
From: szakhour@next.com (Sharon Zakhour)
Newsgroups: comp.sys.next.programmer
Subject: Re: NXBrowser problem...
Date: 7 Oct 92 00:23:40 GMT
Reply-To: szakhour@next.com (Sharon Zakhour)

I wanted to also post some information which explains more fully some of the  
nuances of the factory +setCellClass: method...


First of all, it's important to note that there are two setCellClass mechanisms  
in the AppKit's control classes.  The Control class itself offers a  
+setCellClass: factory method.  This method must be called before any Cell  
instances are created -- typically in the +initialize method as described in  
NeXTanswer appkit.761.

The disadvantage of setting the cell class using the factory method  
+setCellClass, is that it will change the cell for EVERY instance of that class  
-- including subclasses.  For example, if you subclass Button and add a  
+initialize method to look like:

+initialize
{
	[super initialize];
	[MyButton  setCellClass: [MyButtonCell class]];
	return self;
}
@end

Then not only will all instances of MyButton have MyButtonCell as a cell class,  
but so will all instances of Button!  This is probably non-desirable behavior  
for most applications, so for this case we recommend using this approach:

- initFrame:(const NXRect *)frameRect
{
    id newTextField;
   
    [[self class] setCellClass: [TurboTFCell class]];
    newTextField = [super initFrame:frameRect];
    [[self class] setCellClass: [TextFieldCell class]];
    return newTextField;
}

Note that this code is excerpted from the 2.0/3.0 MiniExample TextORama  
[TurboTextField.m] and the README explains why it is implemented this way [in  
change history -- 4/27/92].  Basically the cell prototype is created inside of  
the call to [super initFrame:frameRect] so we are still setting the class PRIOR  
to the creation of the cell.

See my other followup to this thread for more information in the instance  
method of setCellClass available only to NXBrowser and it's subclasses.

Sharon Zakhour
Developer Support 
Newsgroups: comp.sys.next.programmer
From: doberman!mike (Mike Panzitta)
Subject: isKindOf: and IsKindOfClassNamed: problems
Reply-To: doberman!mike@esunix.sim.es.com
Organization: Doberman Systems
Date: Mon, 28 Sep 92 06:23:57 GMT

Has anyone noted these problems with the above methods:

-  First, in 2.x the second method was called isKindOfGivenName: and
   is now isKindOfClassNamed: in 3.0.  No warning or anything that I'm
   aware of indicated this change, and there is no backwards
   compatibility.

-  Second, and more important, I have discovered in a program (actually
   interactively within GDB) this interesting phenomena:

   (gdb) print [aClassObject isKindOf:[Process class]]
   $6 = 0
   (gdb) print [aClassObject isKindOfClassNamed:"Process"]
   $7 = 1

   The second case is the one that is correct.

Any answers or insight?  Thanks in advance,

-Mike

--
Mike Panzitta
Doberman Systems
doberman!mike@uunet.uu.net (NeXTMail)
Newsgroups: comp.sys.next.programmer