HDTenEightyP/NetNews huggingface dataset:
From: lai@Apple.COM (Ed Lai)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Get sender address from an AppleEvent
Date: 28 Sep 92 16:38:08 GMT
Organization: Apple Computer Inc., Cupertino, CA

>myErr = AEGetAttributePtr(&theAppleEvent, keyEventSourceAttr,
>  typeShortInteger, &typeCode, (Ptr) &sessionRefNum, sizeof(int),
>  &actualSize);

Event source just classify where the event is coming from (local, remote etc). 

You want to get it using the keyword keyAddressAttr, ask for typeTargetID,
but just the fact that the session id is the first 4 bytes of a target ID, so
you can ask for just four bytes.

/* Disclaimer: All statments and opinions expressed are my own */
/* Edmund K. Lai                                               */
/* Apple Computer, MS37-UP                                     */
/* 20525 Mariani Ave,                                          */
/* Cupertino, CA 95014                                         */
/* (408)974-6272                                               */
zW@h9cOi

Newsgroups: comp.sys.mac.programmer
From: urban@stout.atd.ucar.edu (Art Urban (PROFS))
Subject: ThinkC TCL Questions
Organization: Atmospheric Technology Division/NCAR Boulder, CO
Date: Wed, 30 Sep 1992 18:18:27 GMT

I don't want to tick anybody off with the following questions, so let me
first state that I read the FAQ, and did not get the answers I was looking
for. So, with that out of the way, here are some questions on TCL.

0 What objects are provided in the base App?
o Text can be real pain to work with on the Mac; Do the Text objects make
  this any easier?
o If I build an App with the Class Lib, and then insert "tons" of my own code,
  what happens when Symantec releases a new version of TCL? Is my code blasted?
  I guess the question here is, how seamless can I reintegrate Symantec's code
  with mine?
o What is the prefered interface construction kit from third parties? And to
  be quite honest, how good/useful are they?
o Are there any books in print which teach a programmer based solely on the
  TCL? 

I think that was it. Thanx!


--
Art Urban 					       urban@stout.atd.ucar.edu
===============================================================================
 "Oh no! The canary exploded!"                                      -Tom Servo 
===============================================================================
Newsgroups: comp.sys.mac.programmer
From: Michael F. Kamprath <kamprath@space-grant.sprl.umich.edu>
Subject: Re: Moving the mouse pointer-- how?
Date: Tue, 06 Oct 92 13:21:46 EDT
Organization: University of Michigan, Aerospace Engineering
X-Useragent: Nuntius v1.1.1d11
X-Xxmessage-Id: <A6F743FDC802C4FC@sprl-mac2016.sprl.umich.edu>
X-Xxdate: Tue, 6 Oct 92 13:24:13 GMT

In article <1992Oct6.002846.10641@acuson.com> Brian Cox, brianc@acuson.com writes:
>jkreibic@sumter.cso.uiuc.edu (Jay Arnold Kreibich) writes:
>
>
>
>>  I am writing a driver program that needs to move the mouse cursor  
>>location around the screen, but I'm not quite sure how to do that.  Any  
>>tips on where to lookup functions that will assign a new mouse pointer  
>>location?
>
>>  Thanks o lot!
>
>>-Jay Kreibich
>> jkreibic@uiuc.edu
>
>
>Without getting in to the subjective merits of doing so, I'll just
>mention that Apple strongly discourages moving the mouse sprite
>without an analogous action from the user.  They discourage it to
>the extent that they don't provide a routine that does it.  You
>might try hiding the cursor and drawing your own.  But that would
>get really ugly fast...  
>

But it has to be possible . . . my reason for saying this is that MacX allows
the cursor to be under the client's control (a nice feature of X-windows).  
MacX is written by Apple, who surely know how to do this.  

========================================================================
| Michael F. Kamprath                   | The University of Michigan   |
|   kamprath@space-grant.sprl.umich.edu |      Aerospace Engineering   |
|   kamprath@engin.umich.edu            |                              |
+---------------------------------------+------------------------------+
| This country is a _democracy_.  It is NOT a "Two Party Sytem."  DO   |
| NOT believe The Lie that not voting Republican or Democratic will    |
| waste your vote.  Vote for who ever you please, and let the          |
| politicians find out what a democratic government is all about.      | 
========================================================================
Newsgroups: comp.sys.mac.programmer
Subject: Newton development tools?
From: nolanl@mdcbbs.com
Date: 30 Sep 92 11:27:28 GMT
Organization: M&E (Division of EDS), Cypress CA
Nntp-Posting-User: gonzales

Is there a source of information about tools from Apple for developers
interested in the upcoming Newton?
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Communication Toolbox
Date: 2 Oct 92 17:27:38 +1200
Organization: University of Waikato, Hamilton, New Zealand

In article <NqPTRB1w165w@bluemoon.rn.com>, zaphod@bluemoon.rn.com (Peter Bierman) writes:
> niko@iastate.edu (Nikolaus E Schuessler) writes:
>
>> I was just considering using the communication toolbox for a project,
>> but was wondering what part of the installed mac base do you exclude
>> by assuming the presence of CTB facilities.. all those before
>> system 6.05? 6.07? How many people are there still using systems that
>> don't support CTB? Enough to justify writing two sets of code?
>> Can you check at runtime if it is available? If so, how?
>
> Well, start by looking for the Gestalt Manager. If it's not there, CTB
> isn't, becuase CTB needs 6.0.5. Then use Gestalt to check for the CTB.

As I recall, version 1.0 of the Comms Toolbox required only System 6.0.3
to run. This means it predates Gestalt (which first appeared in 6.0.4).

I think the Comms Toolbox Gestalt selectors mentioned in IM6 work only with
the System 7 version of the CTB. If you want to check for the presence of
the Comms Toolbox under System 6.0.x, look to see if the _CommToolboxDispatch
trap ($A08B) is implemented.

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+12:00
Beware: too much evil can be good for you.
Newsgroups: comp.sys.mac.programmer
Subject: Novice needs help with pixels.........
From: mgeorgy@vmsclst1.sc.csupomona.edu
Date: 29 Sep 92 00:31:15 PDT
Organization: Computer Science Computational Systems
Nntp-Posting-User: mgeorgy

This will sound like a very dumb question but please bear with me as I am new
to programming the Mac.  What I would like to do is just turn on specific
pixels on the screen I have looked through Inside Mac and could'nt find any of
these functions, procedures.  
My last resort will have to be drawing line of length 1 pixel but I think that
would be really sloooooooow!!!

Any Help Greatly appreciated, also please reply by posting news group as my
mail system is screwy....  Thanx again.
Matt Georgy
California State Polytechnic State University, Pomona  -- Computer Science
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+When It Absolutely, Positively, Has To Be Taken Out Overnight!!!+
+                                                                +
+                                           -- Team Stealth      +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
From: REEKES@applelink.apple.com (Jim Reekes)
Newsgroups: comp.sys.mac.programmer
Subject: Re: GrowZone & A5
Date: 28 Sep 92 20:21:42 GMT
Followup-To: comp.sys.mac.programmer
Organization: Apple Computer, Inc.

In article <1992Sep16.225923.7580@ac.dal.ca>, liaj0032@ac.dal.ca wrote:
> 
> This is a question which I posed on a local bulletin board, but to which
> I did not receive a satisfactory answer.
> My program uses a growZone function in case I am running out of heap space. In
> a tech note (i think it's #180), it says that A5 is not guaranteed to be
> pointing to the application's globals when GrowZone is called, since it could 
> be called by the system.
> It recommends in a tech note that SetUpA5 and RestoreA5 should be used to solve
> this problem. However, these two routines are later discouraged, having been
> replaced by SetA5 and SetCurrentA5, which do not however store A5 in a global
> memory location.
> Since GrowZone is not really called by the programmer, she or he is unable to
> use the trick advocated in the tech notes to get A5 to completion routines or 
> VBL routines by using the address of the parameter block to locate A5. Since
> GrowZone doesn't have a parameter block, and you, as programmer, don't call
> it anyways, how can you ensure that A5 points to your application's globals if
> your GrowZone routine is called!!??
> (p.s. this is the first time I've used internet, and my first time on vms in
> over six years so if something goes wonky here i'll get better!)

The routine below was taken from the MacDTS sample code SoundApp.

FUNCTION MyGrowZone(cbNeeded: Size): LONGINT;

{This is a very basic grow zone procedure.  My application keeps a reserve
 handle of memory in case the Memory Manager gets a request for some memory
 that is not available in my heap.  If memory were to get tight (<32k),
 the Toolbox will crash the system, especially Quickdraw.  Before releasing
 the reserve handle I make sure it isnUt the GZSaveHnd.  This handle cannot
 be touched by the grow zone procedure.

 WARNING:  The grow zone procedure will be called and A5 may not be valid.
 Read Tech Note #136 and 208}

VAR
    theA5:      LONGINT;

BEGIN
    theA5:= SetCurrentA5;
    IF (gReserveMemory^ <> NIL) & (gReserveMemory <> GZSaveHnd) THEN BEGIN
        EmptyHandle(gReserveMemory);
        MyGrowZone:= kSizeOfReserve;                {released this much
memory}
    END ELSE
        MyGrowZone:= 0;                             {this may release more
memory}
    theA5:= SetA5(theA5);
END; {MyGrowZone}


-----------------------------------------------------------------------
Jim Reekes, Polterzeitgeist  |     Macintosh Toolbox Engineering
                             |          Sound Manager Expert
Apple Computer, Inc.         | RAll opinions expressed are mine, and do
20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
Cupertino, CA 95014          |       employer, Apple Computer Inc.S
From: dougm@cns.caltech.edu (Doug McNaught)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Symantec & Borland connection?
Date: 28 Sep 92 18:54:15 GMT
Organization: California Institute of Technology
NNTP-Posting-Host: bradbury.cns.caltech.edu
In-reply-to: eijkhout@cupid.cs.utk.edu's message of 28 Sep 92 16:46:02 GMT

In article <lcedmaINNlej@utkcs2.cs.utk.edu> eijkhout@cupid.cs.utk.edu (Victor Eijkhout) writes:

   last week I bought Think Pascal, and started porting a program
   that I once wrote on teh IBM PC in Borland Turbo Pascal.
   Now, both Pascals use modules, which are not standard. And the
   way they realize modules are virtually the same. (And very much
   different from a modular Pascal that I once used on the Atari ST.
   That one had the best module structure, by the way.)

   So I was wondering:
   Is there a connection between Symantec and Borland?

  The connection is that both Pascals use the unit (module) system of
UCSD Pascal, which was used by Apple for its Apple II Pascal system.
It seems to be the standard, as far as micros go anyway.

-doug
--
Doug McNaught              |"Sadder still to watch it die/ Then never to have
dougm@cns.caltech.edu      | known it/ For you, the blind who once could see/
doug@midget.towson.edu     | The bell tolls for thee..." --Neil Peart
  Nobody approves my opinions! Not even me, sometimes. Read at your own risk.
From: Peter Cramer <pgc@pop.cwru.edu>
Newsgroups: comp.sys.mac.programmer
Subject: TCL panes & controls
Date: 1 Oct 1992 13:09:47 GMT
Organization: Physics Dept, Case Western Reserve University
Distribution: world
NNTP-Posting-Host: physicsmac1.phys.cwru.edu
X-UserAgent: Nuntius v1.1

I'm having a problem with TCL 1.1.2--Mac controls (buttons, scrollbars)
appearing when they should be hidden by a pane in front of them.  Has
anyone else had this problem?  What am I doing wrong?
Xref: sparky comp.sys.mac.programmer:16207 comp.sys.mac.comm:9480
From: ldh@svl.cdc.com (Lawrence D. Hare)
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.comm
Subject: Re: Berkeley Socket Emulation for MacTCP (possible FAQ)?
Date: 28 Sep 92 16:38:49 GMT
Followup-To: comp.sys.mac.programmer
Organization: Control Data Systems
X-UserAgent: Nuntius v1.1.1d9
X-XXMessage-ID: <A6EC830B47010456@ethelred.svl.cdc.com>
X-XXDate: Mon, 28 Sep 92 09:38:19 GMT

In article <ejohnson.717354071@void> Eric E. Johnson,
ejohnson@void.ncsa.uiuc.edu writes:
>>I'm looking for a C library that makes MacTCP look like Berkeley
Sockets.
>>I hear that MIT wrote something like this, and have heard rumors of
>>other packages.  Has anybody heard of such a thing?

BSD sockets for MPW (and maybe in Think C?) : ftp to
madhaus.utcs.toronto.ca

Socket library for MacTCP based on BSD: ftp to net-dist.mit.edu and get
the
file jon/bsd-mac-compat.sit.hqx.  Problems to jon rochlis (jon@mit.edu)

This information originally supplied by sylviae@uga.cc.uga.edu.

Hope this helps
--
Lawrence D. Hare
Newsgroups: comp.sys.mac.programmer
From: rpoldrac@s.psych.uiuc.edu (Russ Poldrack)
Subject: [Q] Reading the serial port
Organization: UIUC Department of Psychology
Date: Tue, 6 Oct 1992 02:54:27 GMT

I need a way to read the serial port quickly and reliably for input
from a voicekey for psych experiments.   The key I have shorts the CTS
line.  The simple way to do it seems to be to enable handshaking on
the CTS line and enable cstEvents using a call to SerHShake() to set
these parameters.  However, IM2 (p. 252) and TN56 both warn that doing
this is discouraged because it will disable interrupts for a long
time.  I'm not knowledgeable enough to know why this is bad.  
Detecting events from the key would then be as easy as calling
something like WaitNextEvent() with a mask for serial driver events.
The other alternative is to call SerStatus() and watch for a change in
the ctsHold field, which should happen when the CTS line is shorted.
Does anyone have a feeling for how well this might work, or which
alternative would be the fastest and most reliable?

Thanks.
russ poldrack
rpoldrac@psych.uiuc.edu
From: de19@umail.umd.edu (Dana S Emery)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Is IM going to be repackaged?
Date: 27 Sep 92 12:16:15 GMT
Followup-To: comp.sys.mac.programmer
Organization: Personal

In article <palmer.717258078@heawk1>, palmer@heawk1.gsfc.nasa.gov (David
Palmer) wrote:
> 
> If Bill Gates couldn't afford the old 6 volume set (as is obvious from
> looking at Microsoft products) how is he going to buy the 15 volume
> set?

hear, hear.

> Seriously, is it now cheaper to buy a CD-ROM player and get Inside Mac
> on CD than it will be to buy the dead-tree version?  (What I am looking
> is something to force myself to purchase a CD drive.) 15 volumes @ $30
> is $450, but I don't know how much each volume will actually cost.

Actually, current 3 vol are 22..29, so maybe $400 would do it, but then
that assumes
the current volumes are representative, and that textbook prices will hold
over the next (15 / 3 * 3 + slop) months.

> 	David Palmer			palmer@tgrs.gsfc.nasa.gov


David, sorry to bust the balloon, but it aint all on CD, just selected
chapters.
Still, there are chapters (and interesting ones at that) which wont see
print for a year or 2, so CD may be the only way to read them.

--

Dana S Emery <de19@umail.umd.edu> | "getta you tootsie footsie ica cream,
                                  |  getta you tootsie footsie ica
cream..."
                                  |
                                  | "I suppose youve got that volume too,
how much? ... "
From: zobkiw@world.std.com (Joe Zobkiw)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Sound Manager Phooey!
Date: 6 Oct 92 12:37:04 GMT
Article-I.D.: world.Bvp9pt.IoB
Organization: The World Public Access UNIX, Brookline, MA

<< If you can get that 4-voice-harmony XCMD to work under 6.0.7, Lawrence,
a lot of people in the music-education biz would be very grateful.  :-)
>>

I wrote an XCMD called PlayChord about 3 years ago that is still available
on America Online and other places. The latest version on AOL is 1.5.1. It 
uses the square-wave synth if memory serves and will play up to 4 notes
simultaneously using any of a number of waveforms (you can even create your
own, however, they are limited to 256 'steps' per waveform).

This was originally written under 6.0.5 with THINK Pascal at the time
and seems to even work fine on my Radius Rocket under 7.0.1! Now _that_
is truly portable code ;)

If anyone is interested I'd be glad totry and dig up the source although
I probably won't be proud of it anymore!

Check out the XCMD if any of you get a chance and drop me a line telling
me your thoughts.


-- 
-------------------------------------------------------------
joe zobkiw         zobkiw@world.std.com        aol: aflzobkiw

macintosh.midi.synthesis.c.oop.asm.communications.graphics...
From: angelo@i40s14.ira.uka.de (Angelo Schneider Betr.Prechelt)
Newsgroups: comp.sys.mac.programmer
Subject: How to use SetTrapAddress in INITs?
Date: 4 Oct 92 17:12:18 GMT
Distribution: uka
Organization: University of Karlsruhe, FRG
NNTP-Posting-Host: i40s14.ira.uka.de


Hi,
   I'm writing my first INIT. If I use SetTrapAddress to change the
   WaitNextEvent Trap, the finder craches. In MacsBug I see that the
   Address I wantet to change is not changed! If I try to write my
   INIT as an Application I can only change Traps for my Application.
   If I switch to an other one all changes are restored.

   Well, I think my problem with the init may be in calling the original
   Trap Address.

   My code looks like this:

...

tPtr2WaitNextEvent  gOWNE;

void main() {

       gOWNE = GetTrapAddress(kWaitNextEvent);
       SetTrapAddress(kWaitNextEvent, myWaitNextEvent);

}


bool myWaitNextEvent(/* parameters like original ... /*) {

       gOWNE( /* include parameters here */); /* call the original */
       /* do some post processing */

} /* myWaitNextEvent */


Well, I do not know if I have to set/save/restore some of the registers,
currently I'm using RememberA0(); SutUpA4(); RestoreA4();
I tried RememberA4(), too.

What do I wrong?
Any help or sample code is wellcome!

please answer via e-mail!

---------------------------------------------------------------------- 
    *                                           | Angelo Schneider
 *** ***  @@@@@/|  angelo@ira.uka.de            | Edelsheimstr. 1 
*******   @@@@/#|  Institut fuer Programm- und  | D-7500 Karlsruhe 1
*******   @@@/##|  Datenorganisation            | voice: ++49-721-607840
 *******  @@/---|  Universitaet Karlsruhe TH    | fax:   ++49-721-613960
  ** **   @/    |      no opinion, I go with the mass!
Organization: Stanford Linear Accelerator Center
Date: Thursday, 1 Oct 1992 01:16:13 PST
From: Nobukazu Toge <TOGE@SLACVM.SLAC.STANFORD.EDU>
Newsgroups: comp.sys.mac.programmer
Subject: Re: Disassembly with source in MPW?

If you are willing to shell out $350 or so, then you can use Steve Jasik's
MacNosy and Debugger.  What you do is to compile and link your MPW program with
-sym on, start your app, then jusp into Steve's Debugger one way or the other.
You will see a source listing that the program is executing.  If you click
on the window while holding down the command key, you'll get an assembly
listing with the higher-language source interlaced.  You can save the listing
to a text file.

It is very much round-about and somewhat ugly, but it works.
(You can do the same with Think C projects).

If someone has written an MPW tool to show assembly + source listing,
that's certainly much nicer.

- Nobu Toge (ex-SLAC, now-KEK)

#include <StandardDisclaimers.h>
Organization: Psychology, Carnegie Mellon, Pittsburgh, PA
Newsgroups: comp.sys.mac.programmer
Date: Thu,  1 Oct 1992 16:14:11 -0400 
From: Matthew Mashyna <mm5l+@andrew.cmu.edu>
Subject: I hate to ask but...

I know this gets asked frequently but I just can't find it anywhere.

Can someone point me to some sample tiff code ? I have a project that
must read and write tiffs <--> picts

Matt
Newsgroups: comp.sys.mac.programmer
From: lsr@taligent.com (Larry Rosenstein)
Subject: Re: sys 6.1 wish list (was JPartialResources.{c,h})
Followup-To: comp.sys.mac.programmer
Organization: Taligent, Inc.
Date: Mon, 28 Sep 1992 21:33:35 GMT

In article <de19-280992121850@mac19-pg2.umd.edu>, de19@umail.umd.edu (Dana
S Emery) wrote:
> 
> I suspect that Apple held some internal straw polls, and couldnt come to
> any usefull concensus.  Since they can more easily charge for system 7.0.x
> than for 6.0.x++, its not too hard to understand the present policy.

I doubt that was a major factor.  The major factor is that Apple doesn't
have the development & testing resources to work on new versions of System
6.  In the long run, it's better if Apple puts its resources towards
improving System 7 so that more people convert over.

Larry Rosenstein
Taligent, Inc.

lsr@taligent.com
Newsgroups: comp.sys.mac.programmer
From: stud08@cc4.kuleuven.ac.be (Karl Pottie)
Distribution: world
Date: Tuesday, 29 Sep 1992 14:13:57 +01
Organization: K.U.Leuven - Academic Computing Center
Subject: DogCow Calls


Moof !

As a true dogcow fan , I'd like to know what the toolbox calls
enable/disableDogCow() do? On which systems are they available ?

Karl
Xref: sparky comp.sys.mac.programmer:16415 comp.sys.mac.system:12481 comp.sys.laptops:3791
From: hseung@anat3d1.anatomy.upenn.edu (Hyunsuk Seung)
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.system,comp.sys.laptops
Subject: Control key problem on Outbound latop.
Date: 1 Oct 92 22:43:51 GMT
Followup-To: comp.sys.mac.programmer
Organization: University of Pennsylvania


Hi,

I recently aquired an used Outbound latop (the one with the detachable
keyboard), but realized with horror that the control key is not
sending the proper keycode.  Pressing control+whatever just sends the
corresponding lower case alphabetd (i.e. pressing control-c (^C) would
send "c").  This happens in all the applications (Key Caps, MicroPhone
II, etc) even after re-installing a fresh operating system (6.0.5,
6.0.8 both with Outbound v 1.1) on a clean system folder.
   I do not think it is a hardware problem since the keyboard table on
KeyCaps responds when the control key is pressed by displaying the
appropriate characters (mostly box-shaped characters) for each keys,
but when when an alphabet key is pressed along with the control key
the square symbol does not show but rather the corresponding alpahbet
itself is typed (I can manually click on the keyboard with a mouse and
it would type in the "correct" control chharacter though).  Also, when
KCHR resource is opened with ResEdit, typing control+whatever displays
the proper key code (switches to table 7).
   My guess is that the system is somehow interpreting the keyboard as
that of Plus or earlier models.  However, the ROM on the Outbound is
that of Mac SE.  I've contacted Outbound, but the technician there
seemed clueless (I had to convince them that it was the control key,
not the command key that I was having problem with).
   Please help me!!

Hyunsuk Seung
hseung@anat3d1.anatomy.upenn.edu