[mod.mac] INFO-MAC Digest V5 #55

INFO-MAC@SUMEX-AIM.Stanford.EDU.UUCP (02/21/87)

INFO-MAC Digest          Friday, 20 Feb 1987       Volume 5 : Issue 55

Today's Topics:
                          Postscript questions
                        AppleTalk Help Requested
                      Pinout for the nine pin modem
                       Paint Grabber and Word 1.05
                      Re: Mac Programming Questions
                 Re:  Questions, questions, questions...
                      RE: Imagewriter II problems.
                     Reformatting "dead" Mac disks.
                    Quickdraw Globals Initialization
                          Welcome2.Hqx feature
             January Technical Notes (from mod.mac.binaries)
                    Mac SE & March 2nd Announcements
                          MACECHO-APPLETALK.HQX
                             DA-AboutFinder
   is anyone using a 200+Meg SCSI-disk on a Mac? know anyone that ...?
                   Query MS-Word 1.05, MS-File formats
                                  ELIZA
                          Apple student rebates


----------------------------------------------------------------------

Subject: Postscript questions
Date: Thu, 19 Feb 87 09:44:27 -0800
From: duggie@portia.STANFORD.EDU

1) I am drawing lines on the laserwriter using postscript via piccomment
calls, as documented in one of the technical notes.  I set the linewidth
to 0.25 (since the printer has scaled everything up for quickdraw, I
scale back down again) and draw lines using a series of moveto rlineto
calls.  The rlineto is the same in each case, so the lines are parallel.
The problem is, some of the lines are twice as thick as the others!  I
have repeated this at several line thicknesses and as long as the lines
are thin enough so that you can see it, it occurs.  Since only the
positions of the lines changes, I assume I must have some rounding error
or something.  Does anyone know a way around this problem?  (The angle
of the lines also seems to make no difference).

2) I hear there is a bboard called 'info-postscript' and that people from
Adobe sometimes read it.  Anyone know if it exists, what machine it is on,
or who runs it?

 Doug Felt
 duggie@portia.stanford.edu

------------------------------

Date: Fri, 20 Feb 87 07:49:57 EST
From: rs4u@andrew.cmu.edu
Subject: AppleTalk Help Requested

Has anyone had any experience writing AppleTalk socket listeners or similar
programs in Pascal or C? (Preferable Pascal, but either is fine). I would
appreciate a direct response or phone call, since I can't read the digests
very often.

Thanks much.

  Rich

Richard Siegel
rs4u@td.cc.cmu.edu
(804)865-3036 @MaBell [8am-4pm Eastern Time]

------------------------------

Date: Fri, 20 Feb 87 17:29:38 est
From: debbie@etl-ai (Debbie Anderson)
Subject: Pinout for the nine pin modem


  Does anybody have a pinout for the nine pin modem?  Also, is there
anything to watch out for when converting the nine pin modem connector to a
25 pin modem?

Thanks in advance,
Debbie

------------------------------

Date: Fri, 20 Feb 87 13:07:14 EST
From: bills@CCA.CCA.COM (Bill Stackhouse)
Subject: Paint Grabber and Word 1.05

Using Paint Grabber (also Art Grabber+) to cut portions of screen
images, I find that it works OK with MacWrite, MacPaint, FullPaint,
etc. When I try to do the same thing with MS Word 1.05, I find that
rarely will Word detect that the scrap has been updated and hence
the clipboard does not change. Any ideas how to get around this?

Bill Stackhouse
Cambridge, MA.
bills@cca.cca.com

------------------------------

Date: Thu, 19 Feb 87 08:23 EST
From: Tom Dowdy              <CML5A9%IRISHMVS.BITNET@wiscvm.wisc.edu>
Subject: Re: Mac Programming Questions

Recently posted were some questions about mac programmng,
namely about how one can have 1) Windows be repainted
2) Files automatically open when double clicked.

The person did not say what sort of language he was using to
do his programming in, but I will assume familarity with the
toolbox, since he mentions GetFInfo.

First, the simple one (hah!):
Window Repainting (Also known as updating).
The mac, lacking hardware window management, generates an
update event when part or all of a window needs to be re
drawn, in addition to this, an update event is generated when
the window is first brought up.  When you detect an update
event in your main event loop, do the following:
   GetPort(oldwindow);
   BeginUpdate(window);
   SetPort(window);
   MyDrawWindowRoutine;
   SetPort(oldwindow);
   EndUpdate(window);
The nice thing about update events is that they filter out
QuickDraw calls that aren't needed for areas of the screen
do speed things up.  However, your MyDrawWindowRoutine shouldn't
do tons of calculations or the like, it should JUST draw the
stuff, otherwise updates will get very slow.  Note that
if your display/graphics are static in nature you can
also store a handle to the quickdraw picture in the window
record and it will be drawn for you automatically.

The second point, (I'll call it harder simply because its always
the last i do)
Opening of files:  When the user opens an application by
double clicking on a file, no menu "event" such as "open" or
"print" is selected, instead, infomation is stored in the list
of "application" files.  The Segment loader section of inside
mac has information on the calls CountAppFiles and GetAppFiles
which allow you to see which files the user double clicked on
(there could be more than one) and if he opened them by clicking
Open or Print.  (If he clicked print, you could branch automatically
to the print routine, speeding things up)...Most often these
calls are handled after initialization, but before the main
event loop.  Basically, you simple call your "open" or "print"
routine for each file in turn.

I'm glad to see programming questions back on Info-Mac.


 Tom Dowdy
 CML5A9@IRISHMVS.BITNET

------------------------------

Date: Thu, 19 Feb 87 8:27:14 EST
From: Thomas Coradeschi (FSA-E) <tcora@ARDEC.ARPA>
Subject: Re:  Questions, questions, questions...

Yep, yer 100% right on that one. Never, Never, NEVER (ever) use an
imagewriter II to print labels. I ran into the same situation you did, with
the little plastic shield being torn. In my case, the printer worked ok
without it, but having a worn out ribbon probably contributed (by not
smearing).  OK, now that I'm done preaching, dont take the printer to your
"friendly" apple dealer. Just go down and tell him to get you the shield.
Should cost about $1.99. Don't know what is causing the other problems,
they haven't occured here yet (in use of ~7 macs and pluses, with 3 IWII's,
one on appletalk). My sugges- tion is to check the switch settings, and
maybe reinstall the printer driver on your system disk.

Regards,
tom c

[ i pay $6.50 a shield from my friendly apple dealer.  am i doing something
wrong?  DoD]

------------------------------

Date: Thu, 19 Feb 87 12:07:35 PST
From: <KNIGHT@maine.bitnet>
Reply-to: KNIGHT%MAINE.BITNET@forsythe.stanford.edu
Subject: RE: Imagewriter II problems.

Samir,

Saw your printers poor plight on Info-Mac. Sounds like you need the
foil thing to keep the ribbon from rubbing on the paper and making
smudges.  You might check the front of the print-head for sharp edges
or a pin that's sticking out too far since you said something is
scratching the paper as the print head moves, and you said you removed
the plastic thing.  It's pretty simple to yank out the print head: just
pull the white tab in front that holds down the print heads 'nose' to
the right, and pull up and out on the print head. Do not disassemble
the print head any further than that.

Good luck.
  Mike Knight

------------------------------

Date: Thu, 19 Feb 87 08:04 CST
From: Wayne <BILLING%UOFMCC.BITNET@wiscvm.wisc.edu>
Subject: Reformatting "dead" Mac disks.

Andrew Glassner asked if there is a way to reformat a disk that the
Mac is having problems with. I believe his problem was that the Mac
wouldn't allow him to delete a file (Locked or in use), nor would it
allow him to select "Erase Disk". I have also encountered the
situation where mounting a diskette will produce the "Eject - Initialize"
dialogue, initializing seems to work, but the next time the disk is
mounted the "Eject - Initilize" dialogue reappears. Both of these
symptoms may of course be due to bad media but what will sometimes work
is holding down the (are you ready for this?) TAB-SHIFT-OPTION-COMMAND
keys while mounting the diskette.

This tells the system that, regardless of what it sees, reformat the
diskette. It seems to be a sort of "last-ditch" effort to recover the
media. This works for me sometimes and the original source was Apple
(I read it in some Apple manual somewhere but I'll be darned if I can
find it now).

One other hint that's kind of related...

If you have a disk that's giving the "Eject-Init" dialogue but you wish
to save the contents of the diskette, holding down the OPTION-COMMAND
keys while launching tells the system to rebuild the Desktop file. This
will sometimes reconstruct enough of the damage to allow at least some
of the needed files from the damaged diskette to be copied.
One added bonus of rebuilding the Desktop file is that you will sometimes
also rescue a little (2-5K) extra space on that diskette.

------------------------------

Date: Fri, 20 Feb 87 10:35:00 PST
From: PUGH%CCC.MFENET@nmfecc.arpa
Subject: Quickdraw Globals Initialization

In the neverending battle with INITs I have found some interesting info that I
may as well pass along.  I would like to thank Mark J. Steiglitz for his help
in solving my problem of initializing Quickdraw without the use of compiler
globals, however, I would be forced to declare his method a bit of a hack.

Here is a more elegant way of initializing Quickdraw and being able to access
it's global variables.  Mark used a variable ThePort : ARRAY[0..206] OF byte
and then called InitGraf(pointer(longint(@ThePort) + 206 - 4));  This seemed
to lack a few pieces of information that I wanted (access to randSeed being
one of them).  So I dug out Scott Knaster's book, How to Write Macintosh
Programs, and found his description of the Quickdraw globals and created this
record:

QDGlobals = RECORD
        { InitGraf(@QDGlobals.thePort) }
        { Private Globals }
        fontData : FMOutPut;
        fontPtr : Ptr;
        fontAdj : Fixed;
        patAlign : Point;
        polyMax : Integer;
        thePoly : Handle;
        playIndex : Integer;
        playPic : LongInt;
        rgnMax : Integer;
        rgnIndex : Integer;
        rgnBuf : Handle;
        wideData : Region;
        wideMaster : LongInt;
        wideOpen : Handle;
        { Public Globals }
        randSeed : LongInt;
        screenBits : BitMap;
        Arrow : Cursor;
        dkGray, ltGray, Gray, Black, White : Pattern;
        thePort : GrafPtr;
        END;
Var
        QD : QDGlobals;

Now you just call InitGraf(@QD.thePort) and there you have it.  No more
magical additions and subtractions (well, we let the compiler do them instead)
and you can access all the globals by name.

As a nitpicking aside, Mark also used:
Var
        gp : GrafPtr;
for
        gp := pointer(NewPtr(108));
when
        gp := GrafPtr(NewPtr(SizeOf(GrafPort)));
would be a bit more symbolic (and possibly flexible should any structures
change in the future).  Sorry to mention it Mark, but coding magic constants
is not a good practice.

I just thought someone might be able to use this info.

Jon

         N         L                          pugh@nmfecc.arpa
          M    A    L          National Magnetic Fusion Energy Computer Center
           F    T    N             Lawrence Livermore National Laboratory
            E         L                       PO Box 5509 L-561
             C                           Livermore, California 94550
              C                                (415) 423-4239

------------------------------

Date: Fri, 20 Feb 87 14:57:52 PST
From: PUGH%CCC.MFENET@nmfecc.arpa
Subject: Welcome2.Hqx feature

I was playing with the archived file WELCOME2.HQX which says something like
"Welcome to Macintosh" and then says the date and time with MacinTalk.  I
found that it also says other things.  If you are in a mood for play, try
resetting your date and running the program a few times.  I recommend
Christmas Eve, Friday the 13th, New Year's Day, and other special days.  I do
not know how many events it recognizes, but it's enough to make me check it
every now and again.   I'll tell you, after hearing it do the same old thing
for so long, I was really surprised to hear it pipe up differently.

Jon

------------------------------

Subject: January Technical Notes (from mod.mac.binaries)
Date: 20 Feb 87 00:48:44 PST (Fri)
From: hplabs!felix!felix.ARPA!rlong@ucbvax.Berkeley.EDU

[
these are the january technical notes.  They are

archvied as
[SUMEX-AIM.Stanford.EDU]<INFO-MAC>TECHNOTES-JAN87-INDEX.HQX
[SUMEX-AIM.Stanford.EDU]<INFO-MAC>TECHNOTES-JAN87-ABOUTTN.HQX

[SUMEX-AIM.Stanford.EDU]<INFO-MAC>TN93.HQX
[SUMEX-AIM.Stanford.EDU]<INFO-MAC>TN101.HQX
[SUMEX-AIM.Stanford.EDU]<INFO-MAC>TN102.HQX
[SUMEX-AIM.Stanford.EDU]<INFO-MAC>TN103.HQX
[SUMEX-AIM.Stanford.EDU]<INFO-MAC>TN104.HQX
[SUMEX-AIM.Stanford.EDU]<INFO-MAC>TN105.HQX
[SUMEX-AIM.Stanford.EDU]<INFO-MAC>TN106.HQX

DoD
]

------------------------------

Date: 20 Feb 87 21:42:48 EST
From: Jeffrey Shulman <SHULMAN@RED.RUTGERS.EDU>
Subject: Mac SE & March 2nd Announcements

[ Uploaded from Delphi by Jeff Shulman ]

This file is a two-page MacWrite document describing Apple's upcoming March 2
announcements of the Mac II and Mac SE.  It goes into some detail about the Mac
SE.  You should read "Mac II First Look" before reading this one.

Ric Ford, "MacInTouch" newsletter

[
Mac II First Look is archived as
[SUMEX-AIM.Stanford.EDU]<INFO-MAC>REPORT-MAC2-FIRSTLOOK.HQX

so naturally I had to name this one

[SUMEX-AIM.Stanford.EDU]<INFO-MAC>REPORT-MAC2-SECONDLOOK.HQX

DoD
]

------------------------------

Date: Thu, 19 Feb 87 20:28:37 est
From: stew%lhasa@hucsc.HARVARD.EDU
Subject: MACECHO-APPLETALK.HQX

Here's a small appletalk application I wrote, with sources (in LightSpeed C).
It registers itself as a MacEcho and then displays all registered entities
on the network until the mouse button is held down.  Not the best programming
style in the world, but I hope it provides a useful example for someone.

Stew <Rubenstein@Harvard.Harvard.EDU>
[
archived as [SUMEX-AIM.Stanford.EDU]<INFO-MAC>MACECHO-APPLETALK.HQX

DoD
]

------------------------------

Date: Thu, 19 Feb 87 22:22 CST
From: <SBOYD%TAMKBS.BITNET@wiscvm.wisc.edu>
Subject: DA-AboutFinder

Ever wondered about what ever happened to that great picture in
About the Finder... from Finder 1.x?  If you like, it can be back.
Enclosed is a DA assembled from bits and pieces from Finder 1.1g and
Lightspeed Pascal's DA sample.  A small bit of fluff.

scott boyd
the machax(tm) group

Thanks to Howard Katz for the idea.

[
archived as [SUMEX-AIM.Stanford.EDU]<INFO-MAC>DA-ABOUT-FINDER.HQX

DoD
]

------------------------------

Date: Fri 20 Feb 87 04:35:46-CST
From: Werner Uhrig  <CMP.WERNER@R20.UTEXAS.EDU>
Subject: is anyone using a 200+Meg SCSI-disk on a Mac? know anyone
Subject: that ...?

a friend called tonight and asked me to send out this query.  He's been
trying to connect a 200+ Meg drive to a Mac --- and live to tell the tale.
but he only gets crashes when he tries to boot the Mac somehow.  he would
like to know if anyone has done so successfully in ANY way ....

please Email to me - I'll summarize if I get AFFIRMATIVE response(s) ..

------------------------------

Date: Fri, 20 Feb 87 13:43:10 est
From: mayerk@eniac.seas.upenn.edu (Kenneth Mayer)
Subject: Query MS-Word 1.05, MS-File formats

Where can I get the specs for the file formats for MS-Word, and MS-File?

Ken

  /|---------------------------------------------------------------|\
 / |    ARPA:      mayerk@eniac.upenn.seas.EDU                     | \
|  |    USnail:    Kenneth Mayer                                   |  |
|  |               University of Pennsylvania, Moore School of Eng.|  |
-  |               305 S. 41st St                                  |  -
|  |               Philadelphia, PA 19104                          |  |
|  |    GENIE:     MAYERK                                          |  |
 \ |    CIS:       [73537,3411]                                    | /
  \|---------------------------------------------------------------|/

------------------------------

Date: Thu 19 Feb 1987 11:44 CST
From: Samir Kaleem <XSAK%ECNCDC.BITNET@wiscvm.wisc.edu>
Subject: ELIZA

Well, since MINDPROBER doesn't really use any AI concepts, my friend is
going to use it (on the reccomendation of someone who answered on the
net...thanx) to talk about the hype of AI to sell software (even though the
software doesn't really use AI) for her class presentation. However, she
would like to supplement this talk with some other presentation that does
use AI. She was considering using ELIZA. Does anyone know if this program
uses any AI concepts?  If so, can anyone describe how it works or give any
other hints that might be used in a class? Is there any other such program
that might be used if ELIZA is not a good choice?

Thanx for any help in advance.

 Samir Kaleem
 <xsak@ecncdc.bitnet>
 <xsak%ecncdc.bitnet@wiscvm.wisc.edu>

------------------------------

Date: Fri, 20 Feb 87 13:39:53 est
From: Mike Marrone <marone@nrl-aic.ARPA>
Subject: Apple student rebates


Way back in October, 1986 my sister bought her Mac Plus, and sent in
for her $200 student rebate.  She still hasn't got it.  Thats about 18
weeks.  Pretty ridiculous.  Has anybody gotten their rebate from this
program, or anyone else sent in for and not gotten it yet?  Also, any
info about who to call at apple about this would be appreciated.
Thanks,
Mike Marrone (marrone@nrl-aic)

------------------------------

End of INFO-MAC Digest
**********************