HDTenEightyP/NetNews huggingface dataset:
From: jmatthews@desire.wright.edu
Newsgroups: comp.sys.mac.programmer
Subject: Re: QuickDraw
Date: 2 Jan 93 00:07:14 EST
Organization:  Wright State University 

In article <1993Jan1.042143.12852@nntp.hut.fi>, jmunkki@vipunen.hut.fi (Juri Munkki) writes:
> In article <1992Dec31.012947.10273@wuecl.wustl.edu> ppc1@cec2.wustl.edu (Peter Pui Tak Chiu) writes:
>>plane while i am showing a frame and then when the new frame is done, i set
>>the viewing rectangle to the newly drawn frame and draw the next frame
>>somewhere else.
> Things do not work this way in QuickDraw. The way you do something like this
> in QuickDraw is by creating an offscreen bitmap, pixmap or gworld. Instead
> of thinking in terms of one huge page, think of various small pieces of paper,
> some of which are visible (the screen bitmap[s]/pixmap[s]) and some of which
> you can only copy to other places (like the screen).

A related paradigm is to maintain a document sized offscreen gWorld. If
the window in which you wish to display this document is smaller than
the document itself (in either dimension), you can get fairly smooth
scrolling by maintaining a "viewRect" whose size is that of the window's
portRect but whose co-ordinates are relative to the gWorld's portRect.
Updates are mostly just a call to CopyBits, eg.:

CopyBits(GrafPtr(gWorldPtr)^.portBits,
         GrafPtr(windowPtr)^.portBits,
         viewRect, windowPtr^.portRect,
         srcCopy, nil);

and scrolling is just OffsetRect(viewRect, dh, dv) followed by an
update (either direct or via InvalRect).

The document can anything from a printed page to a game map; the scheme
works best when the document is fairly static but has to move/scroll
quickly. The overhead for a big offscreen map may be prohibitive and
there's the problem of handling insufficient memory cases, but it's nice
conceptually.

o----------------------------------------------------------------------------o
| John B. Matthews, jmatthews@desire.wright.edu, disclaimer:= myViews <> WSU |
|      "Whom the gods would destroy, they first invite to program in C"      |
o----------------------------------------------------------------------------o
From: greg@dent.uchicago.edu (Greg Kuperberg)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Looking at a bit in a bitmap truly bytes. Help!
Date: 23 Dec 92 15:51:02 GMT
Organization: Dept. of Mathematics, U. of Chicago

In article <1992Dec22.205409.28125@kth.se> d88-jwa@hemul.nada.kth.se (Jon Wtte) writes:
>What's non-oo about chasing down the mask? Don't you store objects
>of icons in a decent data structure, check which one was clicked
>and call the GetMask method of it? 

You shouldn't be surprised that I store the icon with a CIconHandle.
It's a good thing it's a cicn and not an ICON, because then it would
just be a Handle and I'd have no idea where the mask is.

By the way, I was pleasantly surprised that if you have cicn's,
there is no need to have a duplicate lists of ICON's.

>Or even better, have the Icon object know how to check its own mask.

The point is not that I'd like to have my own nifty objects that
obediently inspect themselves.  When it's important to wrap some
variables in an object I'll do it.

Rather, I'd like to respect the Toolbox's informal notion of objects.
I know when I change my data structures.  I don't know when Apple is
going to change theirs.

>What I would do is open a new port, SetPortBits to
>a known scratch space one longword long, and move
>the origin and clip so that you know what's going on,
>and draw the icon MASK into that port, then DisposePort
>the port.

Here are some suggests that have variously come from
you, me, Jamie McCarthy, and Matthew Russotto:

1) Grab the baseAddr and read the raw bytes.
2) SetPortBits to the mask and use GetPixel.
3) SetPortBits to the mask and do a teeny weeny CopyBits to scratch space.
4) SetPortBits to scratch and do a teeny weeny CopyBits from the mask.
5) Use BitMapToRgn if it exists and then use PtInRgn.

What I ended up doing was writing a routine that does 1) and I called
it PtInBitMap.  If the folks at Apple are reading this they should
try to throw such a routine into the Toolbox at some point.  I don't
understand how Quickdraw could have PtInRect but not PtInBitMap.
From: bpb9204@tamsun.tamu.edu (Brent Burton)
Newsgroups: comp.sys.mac.programmer
Subject: Mac-oriented programming magazines
Date: 3 Jan 1993 21:07:32 -0600
Organization: Texas A&M Univ., Inc.
Distribution: usa
NNTP-Posting-Host: tamsun.tamu.edu


Hello, all.

What magazines cater to Mac development?  I've known of MacTutor, and
I recently saw a reference to something called MacTech.  Which have
you found to be informative?  What are some good or bad points about
the magazines you did or did not choose?

All replies, either emailed or posted, are appreciated.

-Brent
-- 
+-------------------------+
| Brent Burton    N5VMG   |    
| bpb9204@tamsun.tamu.edu |  
+-------------------------+ 
Newsgroups: comp.sys.mac.programmer
From: rdd@cactus.org (Robert Dorsett)
Subject: Why would this slow down QuickDraw
Organization: Capital Area Central Texas UNIX Society, Austin, Tx
Date: Mon, 21 Dec 1992 09:28:09 GMT

I've noticed some interesting interaction problems with VersaTerm 4.1 and
flight simulators, including one I'm working on.  The basic problem appears
to be that if VersaTerm is up, then the graphics performance of the simulators
(MS FS, Hellcats) goes through the floor.  In my own program, the performance
loss is as much as 50%, on straight bitmap-copying.  Even with the same program
running, if VersaTerm is then quit, performance goes back to normal.

Can anyone suggest a reason why this is happening?  




---
Robert Dorsett
rdd@cactus.org
...cs.utexas.edu!cactus.org!rdd
Newsgroups: comp.sys.mac.programmer
From: wolfmc@rtsg.mot.com (Michael Wolf)
Subject: Sound Manager usage on SE
Organization: DimensionF
Date: Tue, 29 Dec 1992 18:21:59 GMT

I have some sounds I want to play in an application.  Which machines can
play sounds synchronously?

On my SE if I call PlaySnd, pass it a channel created via SndNewChannel,
and I tell PlaySnd to play it asynchronously (pass it false in the async
parameter), I get one sound to play, there after every call to PlaySnd
will not play a sound.

Also, why is the async flag in PlaySnd opposite of what it would be
intuitive to its name, ie:  if you pass true in async, the sound will be
played synchronously.  Whose the add wizard who came up with that idea?


MJW

-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-
| Michael J. Wolf          | McIntosh Jr:  The power to crush the other kids|
| Software Engineer        |                                                |
| wolfmc@green.rtsg.mot.com|      Disclaimer?  Hell, I don't even know her! |
-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-
From: 9999cs02@uhdvx3.dt.uh.edu (Tina Marie!)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think P and Menu
Date: 24 Dec 1992 08:09 CDT
Organization: University of Houston-Downtown
Distribution: world
NNTP-Posting-Host: uhdvx3.dt.uh.edu
X-Lunar-Date: 5 days, 19 hours, 37 minutes since the last quarter of the moon
News-Software: VAX/VMS VNEWS 1.41A   

In article <1992Dec23.193536.88548@uu0570.foggybottom.com>, Patrick_J._Toole@uu0570.foggybottom.com writes...
>ResEdit has many errors, menus being one of them. I tried calling ADPA, but
>they won't listen. 
> 
>To correct what is going on, when you change the resource ID of a menu, you
>must open the same resource using it's template and change the ID number
>there, too. It's a pretty dumb bug, but oh well!
> 

	Yes, but if you have the menu open when you change the ID, it will
ask you if you want to change the corresponding ID number...

	Tina Femea
	programmer, Kaetron Express
From: j.cook@primerd.prime.com (C. James Cook)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Why would this slow down QuickDraw
Date: 21 Dec 92 19:19:10 GMT
Organization: Prime Computer R&D

The real obvious answer is that even though VersaTerm is in the background and
your flight simulator is in the foreground, VersaTerm is still using some CPU
time when the flight simulator allows other applications to run.  Background
processing is how stuff prints in the print monitor background process while
you go on an do something else simultaneously under Multi-finder or system 7.
Since VersaTerm sounds to be a terminal simulator, I would hazard a guess that
it is checking for incoming characters fairly frequently so nothing will get
dropped.

Just a guess.
Jim
Newsgroups: comp.sys.mac.programmer
From: justin@tasman.cc.utas.edu.au (Justin Ridge)
Subject: MacTCP: basics in THINK C; general examples?
Keywords: MacTCP, THINK C
Organization: University of Tasmania, Australia.
Date: Fri, 1 Jan 1993 06:32:18 GMT

Hi once again!
I have another problem, but thankfully this one is a lot shorter than the
last.  I'm interested in writing an application in THINK C 5 which makes
use of MacTCP.
How does one issue MacTCP with commands from THINK C?  How does one detect
incoming messages?
Does anyone know where I can obtain source code for simple applications
which use MacTCP, written in THINK C or not?  I have got the source for the
ircle IRC client, and though it is in Pascal its a good start.

As usual, please respond DIRECTLY to me, as I probably won't get a chance
to read this newsgroup again before your reply disappears.

Assistance is appreciated.
Regards,
Justin Ridge

justin@tasman.cc.utas.edu.au

--------------------------------------------------------------------------
Justin Ridge,             |    Phone:  +61 02 202811
Computing Centre          |    Fax  :  +61 02 231772
University of Tasmania    |    Email:  Justin.Ridge@cc.utas.edu.au
--------------------------------------------------------------------------
From: jpugh@apple.com (Jon Pugh)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Quick TCL Question
Date: 22 Dec 92 06:52:07 GMT
Followup-To: comp.sys.mac.programmer
Organization: Apple Computer, Inc.

In article <1992Dec22.015946.12196@rock.concert.net>, tbl@rock.concert.net
(Ted B Lowery -- Personal Account) wrote:
> 
> Hi all,
> 
> A quick question about the Think C Class Libraries.  When my program starts,
> it is automatically sent a Open AppleEvent, which opens a blank document.  I
> do not want a blank document automatically opened, so I want to stop this
> default action.  But I cannot seem to find out how to do this without changing
> the core classes.  How should I go about doing this?

Override DoAppleEvent and make the same check the default method does, but
don't do anything.  Pass all other cases.

Jon
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: SetKeys Command in MPW
Date: 28 Dec 92 12:55:02 +1300
Organization: University of Waikato, Hamilton, New Zealand

In article <1992Dec26.003522.4660@gossip.urich.edu>, martinher@urvax.urich.edu writes:
> SetKeys obviously exists, I used it.  I am trying to RTFM.  Does anyone
> know where the reference is located and which manual?

I've only ever seen it documented in ETO release notes for MPW 3.3 alpha. They
did indeed add it to MPW 3.2, but I've seen no official documentation that
admits this. There's nothing in the "MPW Command Reference".

To make it worse, the command is "SetKeys" in MPW 3.2, and "SetKey" in
MPW 3.3. I *used* to be able to use a common name in my UserStartup to define
the "Clear" key to be "Delete Forward" (I have a standard keyboard), that would
work whichever version of MPW I started up with, but not any more. :-(

Just as well I use 3.3 almost exclusively these days. :-)

Lawrence D'Oliveiro                       fone: +64-7-856-2889
Computer Services Dept                     fax: +64-7-838-4066
University of Waikato            electric mail: ldo@waikato.ac.nz
Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
Newsgroups: comp.sys.mac.programmer
From: rmah@panix.com (Robert Mah)
Subject: Adding "System" menus
Date: Tue, 29 Dec 1992 21:51:04 GMT
Organization: PANIX Public Access Unix, NYC

I want to add a menu to the far right of the menu bar (just to the left of
the balloon help menu).  I can patch DrawMenuBar, et. al., however I've 
have another utility, called ColorSwitch that adds it's little icon menu 
just like the system menus (i.e. process and help).  I want to do the same.

Disassembling the code, it seemed that ColorSwitch patches GetMenu, and when
it is caed with a resource ID equal to the balloon help menu, ColorSwitch
simply inserts it's own menu.

So, I happily went off and did the same thing.  One problem it didn't work.
Upon furthur investigation, I found that after ColorSwitch's call to 
InsertMenu, the menu list (off the global MenuList) was unchanged, while
after I did it, MenuList was updated!  What gives?

I don't understand what is happening because, if I trace, I can see that my
patch gets called right after ColorSwitch's patch.

Note that ColorSwitch does NOT patch traps like InsertMenu or GetMenuBar, 
etc.  It's menu gets inserted by the system, just like the process and 
balloon help menus when the application inserts the apple menu.

Note also that I can insert my menu in the menu bar by fooling directly
with the menulist data structure, but I recognize that this is A BAD THING,
and thus want to do things the correct and safe way.

Anyone have any ideas?

BTW, ColorSwitch was written by someone named Andrew Welch, but there was
no e-mail address in the about info or the docs.  Anyone know it?

Cool Runnin'
Rob





-- 
[--------------------------------------------------]
[  Robert S. Mah   |  "Every day an adventure,     ]
[  rmah@panix.com  |   every moment a challenge."  ]
[--------------------------------------------------]
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.programmer
From: jim@bat.cis.ohio-state.edu (Jim Curran)
Subject: SCC 8530 Interface
Originator: jim@bat.cis.ohio-state.edu
Organization: Ohio State Computer Science
Distribution: comp.sys.mac.programmer,comp.sys.mac.hardware
Date: Wed, 30 Dec 1992 14:28:20 GMT

Hello,

The documentation in IM Vol III, pg. III-25 gives the memory locations to
write to the 8530 SCC.  I'm confused though about the utility of the control
registers (aCtl, bCtl):

1)  It seems that the control signals A/!B , !(CE), D/!C, !(RD) and !(WR)
    should be write-only.  Why is there an address for reading them?  Are
    they latched somehow?

2)  It would seem that the offsets and base addresses given to write the data
    lines on the SCC can be decoded to supply the information needed to set
    all of the control signals.  How does this work?

3)  However without aCtl and bCtl how would one simultaneously assert !(RD)
    and !(WR) to reset the chip (one of serveral ways, as I understand)?


Are aCtl and bCtl just there for future expansion or how do you use them?

In case you are wondering I'd like to directly program the SCC on a Mac Plus.

Thanks in Advance,

Jim



Newsgroups: comp.sys.mac.programmer
From: bauer@informatik.uni-ulm.de (Christian Bauer)
Subject: Re: what is the best C compiler
Followup-To: comp.sys.mac.programmer
Organization: University of Ulm
Date: Tue, 22 Dec 92 09:54:39 GMT

In article <1992Dec19.165625.2597@ll.mit.edu>, cogen@ll.mit.edu (David
Cogen) wrote:
> 
> 
> In article <1992Dec16.162318.4371@news2.cis.umn.edu>, kdlee@umn-cs.cs.umn.edu (Kevin D. Lee) writes:
> |> In article <PA-151292184926@macmartineau.ccr.hydro.qc.ca> PA@PARobitaille.ccr.hydro.qc.ca (Paul Andre Robitaille) writes:
> |> >I am looking for a C compiler on the MAC. What is the best ?
> |> >
> |> Think C is a great C compiler.  If you can get it through the
> |> education channel the price is great.
> |> 
> |> Kevin Lee
> 
> There is nothing better than Aztec C. If you are doing serious work there is
> no substitute. It comes with a real make utility, a separate and configurable
> assembler and linker, and provides voluminous technical information about
> internal data formats, parameter passing, etc. And it comes with the MPW shell
> so you get the benefits of MPW without putting up with the poor MPW C compiler.
> 
> By all means get the commercial version. Price I think is $500, which includes
> MPW shell, C compiler, assembler, linker, several utilities including make,
> grep, a vi like editor, and standard ANSI libraries and other libraries
> including library source code. 

GNU C compiler for MPW version1.37 has the fastest and tightest code I have
seen. But it fails on Quadra with cache on (why? the code it produces is
ok?!?!?!). I hope the new Version 2.xx will be seen on the MAC.

For reference MPW C 3.2 22500 dhrystones and GNU C 25000 dhrystones on a
Quadra 700 without cache-board.

Christian Bauer

bauer@informatik.uni-ulm.de
From: ibhan@husc10.harvard.edu (Ishir Bhan)
Newsgroups: comp.sys.mac.programmer
Subject: Help problems
Date: 24 Dec 92 17:56:26 GMT

I'm running THINK Pascal verision 4.0.1 and I'm trying to take advantage
of the balloon help option.  I've included Traps.p and Ballons.p, but when
it loads, it gets to "uses Balloons" and says "_Pack14" is not declared. 
Do I need a newer version of Traps (I couldn't find _Pack14 in that).  If
so, is there somewhere to FTP?
-- 
               -  Ishir Bhan -  ibhan@husc.harvard.edu  - 
                                     - - - 
           "The sky and the impossible explode..." -The Cure
From: ibhan@husc10.harvard.edu (Ishir Bhan)
Newsgroups: comp.sys.mac.programmer
Subject: DuoDock/ResEdit conflict
Summary: Duo Dock and ResEdit
Date: 22 Dec 92 07:23:44 GMT
Article-I.D.: husc.ibhan.725009024

I recently purchased a PowerBook Duo 230 and a DuoDock.  Up until now,
everything had been going smoothly.  My only problem has been with
ResEdit.  When undocked, everything is fine.  When I try to open a file
with ResEdit while docked, or create a file while docked, I get a dialog
saying:
"The resource was not found [-192]."

I've tried the usual solutions plus some extras.  None of the following work:
1)Rebooting without INIT's.
2)Replacing ResEdit with a fresh copy (I now have 2.1.1).
3)Booting from a floppy (I had to copy the system manually to the floppy
from my Duo.  The Disk Tools disk didn't work with the Duo.

The only thing I haven't done is install the System from scratch.  Since I
misplaced my original disks, there's no way I can test this.  However, I
don't think the problem lies here.  It's really essential that I get
ResEdit working on the Docked setup.  Does anyone have a clue as a to what
I can do?
-- 
               -  Ishir Bhan -  ibhan@husc.harvard.edu  - 
                                     - - - 
           "The sky and the impossible explode..." -The Cure
From: bobert@informix.com (Robert Murphy)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Memory debugger available for Mac?
Keywords: memory, debugger, Mac, errors
Date: 29 Dec 92 22:42:58 GMT
Organization: Informix Software, Inc.

d88-jwa@dront.nada.kth.se (Jon Wtte) writes:

>In <1992Dec19.204150.895@leland.Stanford.EDU> kocks@chemistry.leland.Stanford.EDU (Peter Kocks) writes:

>>I'm looking to find a decent memory debugger for the Mac.  Something
>>along the lines of "Purify" for the Sun.  You know, if I point to
>>someplace I'm not supposed to be, it will tell me immdiately.   There
>>most be some tools for debugger memory problems on the Mac. Yes?

>Well, "The Debugger" from Jasik Designs supposedly does funky
>MMU stuff for 030 machines. For 040s I don't know of any.

Jasik is promising MMU protection for 040 machines in his next version,
which is scheduled for January.  I hope he can make that timetable.
Basically, his MMU protection (on 030 machines and 020's with a PMMU)
lets you pick major areas of memory (e.g. low-mem globals, the System
heap, all apps except yours, etc.) and write-protect and/or read-protect
them on an individual basis.  You can also write-protect your app's
code resources, including stand-alone code resources.

I would also recommend looking at a recent book entitled "No Bugs!"
(sorry, can't remember the author or publisher).  There's a good-sized
chapter on tricks for finding memory bugs; it's aimed at the DOS/Windows
world but the gimmicks are quite applicable to Macs with a little
tweaking.  I would consider these techniques complementary to what
Jasik does.  Jasik's stuff is good for catching severely errant pointer
problems and whatnot.  These tricks are good for catching memory leaks
and minor memory overwrites.

Regards,
Bob Murphy
bobert@informix.com
From: bowden@csd4.csd.uwm.edu (John William Bowden)
Newsgroups: comp.sys.mac.programmer
Subject: What are the proper docs on SoundManager?
Date: 30 Dec 1992 14:48:56 GMT
Organization: Computing Services Division, University of Wisconsin - Milwaukee
Distribution: world
NNTP-Posting-Host: 129.89.7.4
Originator: bowden@csd4.csd.uwm.edu

Hiya,

 What are the correct docs to use when programming for sounds?
Are they still the updated chapter released with the Tech Notes?

-thanks,
 john
From: d88-jwa@hemul.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Problem with patch to HFSDispatch
Date: 23 Dec 92 11:05:45 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <1992Dec22.182710.26751@panix.com> rmah@panix.com (Robert Mah) writes:

>I'm using register a1 to hold the adress of the real trap -- is there
>something wrong with this?  Anyone care to comment?

>@1      move.l   realHFSDispatchTrap, a1   ; grab the addr of the real thing
>        movem.l  (sp)+, a4                 ; restore registers
>        jmp      (a1)                      ; jump to real HFSDispatch

Yes, this trashes register a1.

Instead, you should "reserve space" on the stack for the
chain address, save the registers, do your thing, put
the registers back into shape and RTS _to_the_next_routine_.

Something like:

	subq #4, a7
	movem.l	a1/a4, -(a7)
	...
	do stuff
	...
	move.l realHFSDispatchTrap, a1
	move.l a1, 8(a7)
	movem.l (a7)+, a1/a4
	rts

Note that this _IS_ a head patch, since the "RTS" actually
is used as a jump to the next function, leaving stack and
registers intact.

Cheers,

						/ h+

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  "It was, in fact, cool as all get-out.  Fortunately it was a little
   too late (historically speaking) to be groovy."
                     -- Dennis Pelton
From: ttak@ellis.uchicago.edu (toki  takeuchi)
Newsgroups: comp.sys.mac.programmer
Subject: TESTING.  Ignore.
Date: 24 Dec 92 19:22:13 GMT
Reply-To: ttak@midway.uchicago.edu
Organization: University of Chicago Computing Organizations






dkfdkf
From: bowman@reed.edu (BoBolicious)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How does my app know that its document was double clicked?
Date: 31 Dec 92 21:32:34 GMT
Article-I.D.: reed.1992Dec31.213234.17023
Organization: Reed College, Portland, OR

In article <1992Dec31.205747.16147@netcom.com> bskendig@netcom.com (Brian Kendig) writes:
>Now I've got a question, too.  How do you cope with double-clicking
>files that belong to an _open_ application?  Does this require the use
>of AppleEvents?  Right now, when I dragdrop a file onto my app, it
>launches and opens the file, but when I dragdrop another file onto my
>app, the Finder says "Some files could not be opened.  Try opening
>them from within the application."

Naturally, AppleEvents are the preferred way to handle this.

If you app isn't AE-aware, MF/Sys7 attempts to fool your app by patching a
bunch of traps, and passes your app a mousedown event in the File menu, 
resolves it to whicheven item in the File menu is "Open...", then patches 
SFGetFile, return an SFReply that has the double-clicked document in the 
record.  If there's anything funky about how your app handles opening files, 
in particular if there are different menu items to open different kinds of 
files, this scheme will fail.

cheers,
bobo              In seeking the unattainable,
bowman@reed.edu            simplicity only gets in the way.
Eternal nothingness is fine if you happen to be dressed for it. - Woody
Newsgroups: comp.sys.mac.programmer