🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #1502

printing a Window

#1502
From: Robert Mueller
Date: Thu, 15 Oct 1992 09:15
60 lines
2303 bytes
Is there a bug in window's printPSCode-method?

Window's printPSCode method routine does not print instances of my  
"Form"-subclass correctly, although displaying 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 sense is just to allow better input-checking  
(by overwriting Cell's method  "isEntryAcceptable." in TheMPOCell). On screen,   
TheMPOForm  objects behave exactly like Form-Objects, but printing a Window  
containing TheMPO-Form objects by using the "printPSCode" method does not work:  
Some TheMPOForm-objects are printed, while others are ignored; sometimes the  
whole TheMPOForm is rotated.

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



+ initialize
{
     
   [[TheMPOForm class] setCellClass: [TheMPOCell class]];     
   return self;
}


- initFrame:(NXRect *)frameRect
{ 
    id firstCell;
           	
    [super initFrame:frameRect];
    [self setEntryWidth:150];        
    firstCell = [self insertEntry: "Input" at: 0];  
    // TheMPOForms are initialized with just one TheMPOCell
    
    [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;
}


Please post me

Thank in advance!
Technical Details
Message-ID: <GKY7NFV@minnie.zdv.uni-mainz.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!news.th-darmstadt.de!news.uni-mainz.de!usenet

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!news.th-darmstadt.de!news.uni-mainz.de!usenet
From: mueller@n1 (Robert Mueller)
Subject: printing a Window
Message-ID: <GKY7NFV@minnie.zdv.uni-mainz.de>
Keywords: printPSCode
Sender: usenet@minnie.zdv.uni-mainz.de (USENET News System)
Nntp-Posting-Host: n1.imsd.uni-mainz.de
Organization: Johannes Gutenberg Universitaet Mainz
Date: Thu, 15 Oct 1992 09:15:39 GMT
Lines: 60