Article View: comp.sys.next.programmer
Article #1673window's printPSCode - method
From: Robert Mueller
Date: Wed, 30 Sep 1992 11:59
Date: Wed, 30 Sep 1992 11:59
46 lines
2057 bytes
2057 bytes
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!
Technical Details
Message-ID:
<11H70CP@minnie.zdv.uni-mainz.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!news.th-darmstadt.de!news.uni-mainz.de!usenetShow Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!news.th-darmstadt.de!news.uni-mainz.de!usenet From: mueller@n1 (Robert Mueller) Subject: window's printPSCode - method Message-ID: <11H70CP@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: Wed, 30 Sep 1992 11:59:40 GMT Lines: 47