HDTenEightyP/NetNews huggingface dataset:
From: eijkhout@cupid.cs.utk.edu (Victor Eijkhout)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think Pascal and ResEdit questions
Date: 28 Sep 92 18:32:46 GMT
Reply-To: eijkhout@cupid.cs.utk.edu (Victor Eijkhout)
Organization: University of Tennessee, Knoxville - Department of Computer Science
NNTP-Posting-Host: cupid.cs.utk.edu

In article <TREE.92Sep28132201@kira.uvm.edu>, tree@kira.uvm.edu (Tom Emerson) writes:
|> In article <lcee1bINNlej@utkcs2.cs.utk.edu> eijkhout@cupid.cs.utk.edu (Victor Eijkhout) writes:
|> 
|>    2/ I have programmed mouse-and-menu programs before on the Atari ST, and
|>    the resource construction programs there gave you a possibility to
|>    give symbolic names to items in the resource, which you then used in your
|>    program. This way alterations in the resource do not necessitate alterations
|>    in the program. Is such a thing possible with ResEdit, combined with Think
|>    Pascal?
|> 
|> Not as such. You can define a group of constants in your source file for
|> particular parts of your dialog or for resource id's. I'm not sure I
|> understand how the symbolic names of the Atari system differ from the resource
|> id's used with the Mac?

On the Atari the resource construction program yielded a .RSC file
with the resource and a .RSD file with for C 'define' and for Pascal
'Const' statements equating for instance
 Const File_menu = 129,
where in the res. program you have told that 'File_menu' is the label
for the file menu.

This file is then loaded into your program, and you only have
to remember the name 'File_menu', and not its ID. I seem to remember
that there were reasons why you wanted to renumber in a resource every
once in a while, and then these names are very convenient.

If I've understood ResEdit correctly, then the number of an item in a 
menu is simply the number of the line it appears on. This is awful:
If I insert a menu item higher up I have to change the item ID in
my program. Have I really understood this correctly?

|> Tom

Victor.
From: udmorrow@mcs.drexel.edu (Daniel Morrow)
Newsgroups: comp.sys.mac.programmer
Subject: Finding system folder in system 6
Date: 28 Sep 92 02:45:24 GMT
Distribution: usa
Organization: Drexel University

Subject line says it all. I'm writing a program that will
have a preference file. I know how to get the Preferences folder
in System 7. I need to know how to get the System folder in
System 6. Forgive me if this is a FAQ... 

Also, what is the best way to tell if system 6 or 7 is running?

Thanks in advance.
-Dan.
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: Sound Manager Phooey!
Organization: Kalamazoo College
Date: Mon, 5 Oct 1992 13:09:14 GMT

dan@chaos.cs.brandeis.edu (Dan Schwarz) writes:
>
>* the Mac LC uses a crippled version of the Apple Sound Chip. So does the LC II
>and Classic II, by the way. Major difference is that this chip can only handle
>monophonic sound output, and cannot support simultaneous sound recording &
>playback.

Hmmm.  Well, the preliminary developer note for the LC (I seem to have
lost the final :-) says it "implements a subset of the ASC," but I think
it would more accurately be described as really simple hardware and a
Sound Manager that tries to make up for it.

Another difference is that the LC doesn't support the 4-channel
wavetable mode, which is part of the ASC.  (But does the Sound Manager
recognize an ASC and use it for 4-channel wavetables?  Theoretically,
four waveTableSynth channels should take almost no CPU time.  Has anyone
checked this out?)

Later, it says "The sound system is similar to the Plus and SE sound
systems in that main memory is used for the sound buffer.  Because the
Macintosh LC computer's video modes have different line times...the
sound system has its own timing chain, which samples at the same
rate..."  Later it explains that this stuff is built into the V8 gate
array, which appears to be a catch-all custom chip to do a hodgepodge of
things that lots of little chips used to take care of.  (You can see by
my language that I'm not a hardware person.  :-)

Anyway, it looks like "subset of the ASC" is misleading.  I'd call it a
"simulation of the chintzy RAM-sampling technique used by the original
128K Mac, plus sound input, all tied together by the much-overworked
Sound Manager."

Can anyone who knows more about the LC, and hardware in general, expound
on this?

>* the System 6.0.7 and 6.0.6 sound managers have MAJOR bugs, especially when
>dealing with the LC.

Well, I don't know about the LC in particular, but those sound managers
in general are a _lot_ more trustworthy than in previous versions.

>Unless the "delay" tactic mentioned earlier is successful, the only thing
>you can do is to complain to MacDTS until you get a reasonable response.

I was going to suggest using a custom double-buffering routine, but I've
never done it myself so I can't give advice.  I'd try that before
calling up MacDTS though.
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 "I don't think we should have to have them wandering the streets
  frightening women and people."                            - Pat Buchanan
From: Alexander M. Rosenberg <alexr@apple.com>
Subject: Re: Communication Toolbox
X-Useragent: Nuntius v1.1.1d10
Date: Fri, 2 Oct 1992 17:03:38 GMT
X-Xxdate: Fri, 2 Oct 92 18:03:18 GMT
X-Xxmessage-Id: <A6F1CEE61B010C7C@mtdew.apple.com>
Organization: Hackers Anonymous

In article <1992Oct2.172738.11207@waikato.ac.nz> Lawrence D'Oliveiro,
ldo@waikato.ac.nz writes:
>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).

CommToolbox requires System 6.0.4. The Gestalt selectors for the Macintosh
Communications Toolbox only appear in System 7.

Starting with System 7 Release 7.1, the version of CommToolbox follows along
with the rest of the System.

Check for the presence of _CommToolboxDispatch using the function described on
page 332 of Inside the Macintosh Communications Toolbox.
---------------------------------------------------------------------------
-  Alexander M. Rosenberg  - INTERNET: alexr@apple.com      - Yoyodyne    -
-  330 Waverley St., Apt B - UUCP:ucbvax!apple!alexr        - Propulsion  -
-  Palo Alto, CA 94301     -                                - Systems     -
-  (415) 329-8463          - Nobody is my employer so       - :-)         -
-  (408) 974-3110          - nobody cares what I say.       -             -
From: jbush@magnus.acs.ohio-state.edu (J Eric Bush)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think Pascal and ResEdit questions
Date: 28 Sep 92 19:54:08 GMT
Organization: The Ohio State University

In article <lcee1bINNlej@utkcs2.cs.utk.edu> eijkhout@cupid.cs.utk.edu (Victor E
ijkhout) writes:
>Hello,
>
>working with Think Pascal and ResEdit (and being mondo pissed that the
>Pascal manual nowhere mentions that you need ResEdit for creating resources),
>I had the following questions:
>
>1/ using system 7 I would like to have both Pascal and ResEdit open, but
>if I'm editing the resource, Pascal has trouble finding elements (menubar
>for instance) in it. So I have to close the resource every time I want
>to test run the program. Is there an explanation / work-around for this?
>
>2/ I have programmed mouse-and-menu programs before on the Atari ST, and
>the resource construction programs there gave you a possibility to
>give symbolic names to items in the resource, which you then used in your
>program. This way alterations in the resource do not necessitate alterations
>in the program. Is such a thing possible with ResEdit, combined with Think
>Pascal?
>
>Thanks in advance.
>
>Victor.
>
>

1/ ResEdit will mark a file as being opened with the ability to read and
   write so another program can't have access to it at the same time.  The
   best work around is use the "Modify Menu" option in ResEdit so that
   command-1 opens the resource you want to edit.  Edit it, then close it
   when returning to Pascal, it can access everything just fine.  When you
   want to go back to ResEdit switch to it under mutilfinder and press
   command-1 and your back to editting your resource.  BTW, Think Pascal
   manuals do mention ResEdit all over the place.  Each of the examples
   are based on ResEdit and it comes with the program.

2/ If you want to use symbolic names, you have to use the ResEdit Get Info
   command and then type in a name for the resource.  Note: I have given
   names to resources, but do not use them in programs, so if this doesn't
   work, forget where you heard this.

Eric
-- 
------------------------------------------------------------------------------
J. Eric Bush
Internet: jbush@magnus.acs.ohio-state.edu
From: schulte@KLIN.FAR.RUU.NL ("Bas Schulte, Spider")
Newsgroups: comp.sys.mac.programmer
Subject: Re: TCP/IP thru ARA Possible?
Date: 3 Oct 92 17:45:01 GMT

In article <searsk-031092080647@3.7.192.225>, searsk@med.ge.com (Kevin D. Sears) 
wrote:

>Setup Network in the Control Panel as follows:
>---------------------------------------------
>Select "Remote Only"


Not even necessary, I run the same setup (i.e. ARA and MacTCP) from my home, and 
my network control panel says plain "LocalTalk Builtin" and it works like a 
charm. I could print to my LaserWriter as well at the same time, I guess.

Even at 2400 baud it is acceptable for a bit of e-mail and news.


Best regards, Bas Schulte.


----
This is getting better and better!
from: schulte@klin.far.ruu.nl
Newsgroups: comp.sys.mac.programmer
From: raffuj@aix.rpi.edu (Jose Raffucci)
Subject: Graphics file formats sought...
Organization: Rensselaer Polytechnic Institute, Troy, NY
Distribution: usa
Date: Sun, 27 Sep 1992 00:49:05 GMT

I'm writing a program that will hopefully write pictures to different file 
formats.  I need to find the specs for GIF, TIFF, JPEG, etc...  Nothing terribly
detailed, just something that will let me save them and have other progs read
them...  an ftp site would be great, but a book name would help a lot too...

thanks
hOz

-- 
/*-----------------------------------------------------------------------------           
  //  The Amigoids from hell,     raffuj@rpi.edu    "I smell something Stinkee!"                  
\X/  Renssepolyinstatechnitute               "Hoek, you idiot, Hoek, not HORRK!"                                     
   "Ignorant?  What's ignorant??"  "*boink, boink*  I dunno, but weeez it!"
Newsgroups: comp.sys.mac.programmer
From: tel@adimail.uucp (Terry Monks)
Subject: Comm Toolbox and MIDI
Organization: Automata Design, Inc.
X-Newsreader: TIN [version 1.1 PL6]
Date: Mon, 5 Oct 1992 19:38:51 GMT


I really expected that I could make a connection with
the MIDI Manager to a port other than the printer or
modem port. If the Communications Toolbox knows about
my other ports (Taniwha card), why does the MIDI manager
not? Is there anyway I can get there from here?

-- 
Terry Monks        Automata Design Inc    (703) 742-9400
From: mxmora@unix.SRI.COM (Matt Mora)
Newsgroups: comp.sys.mac.programmer
Subject: Re: What does DrawPicture() want?
Date: 28 Sep 92 16:21:21 GMT
Organization: SRI International, Menlo Park, California

In article <lsr-250992163555@lsr.taligent.com> lsr@taligent.com (Larry Rosenstein) writes:
>In article <38871@unix.SRI.COM>, mxmora@unix.SRI.COM (Matt Mora) wrote:
>> 
>> Did you lock the picthandle before you called drawpicture? DrawPicture
>> is a routine that WILL move memory.
>
>I didn't think this was necessary.  QuickDraw should lock the handle if it
>needs to.

IM doesn't say that Drawpicture locks the handle. I did an 'ir drawpicture'
in macsbug and didn't see a hlock. (though I'm not sure thats the right
command to use). I seem to remember a program I wrote a long time ago
would crash occasionally. It was drawing a complicated pict as a header
in a window. When I added hlock before the drawpicture calls the random
crashes disappered. I may have locked some other stuff too, its been a while.
Anyway, try locking the picture first then drawpicture. 

Matt

-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________
From: grobbins@Apple.COM (Grobbins)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Get sender address from an AppleEvent
Date: 27 Sep 92 22:33:15 GMT
Organization: Apple Computer Inc., Cupertino, CA

In article <1992Sep25.181233.28698@CS.ORST.EDU> trinkad@fog.cs.orst.edu (Darald Trinka) writes:
>  Can some one tell me if this is the correct way to get the
>sender's address out of an AppleEvent so I send a message back at some 
>latter time.  
>
>myErr = AEGetAttributePtr(&theAppleEvent, keyEventSourceAttr, 
>  typeShortInteger, &typeCode, (Ptr) &sessionRefNum, sizeof(int),
>  &actualSize);

The event source attribute is a number indicating how the event
was transmitted (directly from the same process, from another
process on the machine, and so forth.)  It is a short containing
the equivalent of an enumerated from this list (taken from
AppleEvents.p):

     AEEventSource = (kAEUnknownSource, kAEDirectCall, kAESameProcess, 
                      kAELocalProcess, kAERemoteProcess);

This event source information is rarely useful.

To find the sender of an Apple event, use AEGetAttributePtr to extract
the address attribute (keyAddressAttr) of the event.  It will be a
process serial number or target ID.  Use the same buffer (and the same
data type) to later create a new address descriptor.  This is discussed
on page 107 of issue 10 of develop magazine.

Grobbins        grobbins@apple.com

Usual disclaimers apply.
From: gt5936c@prism.gatech.EDU (gt5936c Addy,Thomas Eugene III)
Newsgroups: comp.sys.mac.programmer
Subject: Update drawing order in modeless dialog
Date: 27 Sep 92 04:12:09 GMT
Organization: Georgia Institute of Technology

I'm writing a little hypercard look-alike program.  It's super simple (about
20-30 lines of code), and it works great except here's the problem:  I have
a PICT item in the DITL as a backdrop, with buttons placed in the dialog box
over the PICT item.  This works fine at first, but whenever my screen updates,
the buttons are drawn _behind_ the pict item.  I've tested this by shrinking
the PICT item so it no longer covers the buttons; this is definitely what is
happening.  How do I get the buttons to draw over the PICT item?  Is it
something to do with the item numbering?  I tried rearranging them but that
didn't help.

Thanks in advance...


-- 
Internet: gt5936c@prism.gatech.edu
	"I'll employ my resources to make your puny lives miserable!  I'll
	crush your pathetic dreams and ambitions like bugs in the dust!"
		--Calvin ("Calvin & Hobbes")
Newsgroups: comp.sys.mac.programmer
From: tomh@wes.on.ca (Tom Haapanen)
Subject: CountAppFiles --- and starting a child process
Organization: Waterloo Engineering Software
Date: Wed, 07 Oct 1992 00:06:24 GMT

My Mac app is progressing (thanks to those who helped me out at an earlier
stage), and my collection of Inside Mac volumes is growing.  :)  However,
I have run into some more roadblocks.

  - I'm using CountAppFiles as described in both Inside Mac and Macintosh
    Revealed.  However, no matter how many files I drag to my app, or how
    many data files I try to print, the second parameter gets set to 0.  The
    app starts up fine from double-clicking on a datafile, but there is no
    filename that I could open.

    My Think C 5.0 code fragment:

	  short iWhat, iCount;
	  CountAppFiles( &iWhat, &iCount );
    
    iCount gets set to 0, and iWhat seems to get set to a random value. 
    What's going on?  (I'm running System 7.0.1 on a IIcx.)

  - I need to start up a file browser to view my output files.  In another
    environment I'd use spawn() or system() or WinExec(), but I can't find
    anything in the manuals that'd start another app without closing the
    current one.  Surely there is a way to do it, right?  (No, the app
    won't need to run on System 6.)

Any and all help, hints, suggestions, tips and sympathy are gratefully
accepted!  :)

[ \tom haapanen    "i don't even know what street canada is on" -- al capone ]
[ tomh@wes.on.ca                   "trust the programmer" -- ansi c standard ]
[ waterloo engineering software      "to thine own self be true" -- polonius ]
Newsgroups: comp.sys.mac.programmer
From: henry@geo.ucalgary.ca (Henry Bland)
Subject: need C source to get a resource
Date: Mon, 5 Oct 1992 21:34:36 GMT
Organization: Geology & Geophysics, University of Calgary, Canada

I'm trying to read a single resource from a C program on a Unix
machine.  I have access to the resource fork file, so I just need to
figure out how resources are stuffed into the resource fork.  Any
pointers to documentation would be helpful.  Even better would be some
code that actually does this.  I'm not a mac programmer, but I think
what I'm looking for is something like the source to Get1Resource().

Thanks,
-Henry Bland
Newsgroups: comp.sys.mac.programmer
From: niko@iastate.edu (Nikolaus E Schuessler)
Subject: Re: Source Code via FTP!!!!?!?!?!?!???!?!?
Organization: Iowa State University, Ames, IA
Date: Tue, 29 Sep 1992 12:27:13 GMT

In article <1992Sep29.003323.1@vmsclst1.sc.csupomona.edu> mgeorgy@vmsclst1.sc.csupomona.edu writes:
>I was just wondering are there any FTP sites that keep just Mac specific source
>code???  Anything like MacTutor stuff, or just anything at all for that matter.
>

Yuppers.  Try ftp.apple.com or wuarchive.wustl.edu (in /mirrors/info-mac).









-- 
Niko Schuessler               
Project Vincent Systems Manager              email: niko@iastate.edu
Iowa State University Computation Center     voice: (515) 294-1672
Ames IA 50010                                snail: 272 Durham
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think C wish list
Date: 29 Sep 92 16:37:44 +1200
Distribution: comp
Organization: University of Waikato, Hamilton, New Zealand

In article <1992Sep28.224932.9917@ccu1.aukuni.ac.nz>, russells@ccu1.aukuni.ac.nz (Russell Street) writes:
>
> * Someway to have pre-compiled headers automatically generated from a set of
> 	[.h] files, and not just for one precompiled header file per project.
>
> My scheme with precompiled headers is to precompile the Macintosh #includes
> into one file (called StdHeaders, say) and then precompile all the project
> specific headers (~5000 lines) into another file (Headers) which is then
> included in the source files.   [But it gets worse as I do this TWICE
> one for a small set of MacIncludes and again for a fuller set, with things
> like Gestalt included.]
>
> An MPW like #pragma dump scheme could be quite a good way to implement this.

Ah, all these kludges upon kludges. Why not just use a language with PROPER
support for separate compilation!

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.
From: ekstrom@oce.usc.edu
Newsgroups: comp.sys.mac.programmer
Subject: Looking for recent serial port code snippet?
Date: 28 SEP 92 10:35:53
Organization: University of Southern California
Distribution: world
NNTP-Posting-Host: oce.usc.edu

A friend of mine is trying to write an interface to an electronic stage
attatched to a microscope using the serial port of a mac IIci. I remembered
a recent post containing some sample code using the serial port, but it
has not made it into the digest. Could someone please e-mail it to me?
Thanks for your help, Harold.
Please reply to ekstrom@oce.usc.edu
From: grobbins@Apple.COM (Grobbins)
Newsgroups: comp.sys.mac.programmer
Subject: Re: JPartialResources.{c,h}
Date: 27 Sep 92 22:53:38 GMT
Organization: Apple Computer Inc., Cupertino, CA

In article <1992Sep25.225952.24833@hobbes.kzoo.edu> k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
>mgleason@cse.unl.edu (Mike Gleason) writes:
>>I nominate that the FSSpec calls be added to a new System version 6.1.
>>There are probably other bits (like partial resources, even though they're
>>not used often) that could be added to a 6.1 that wouldn't require the rest
>>of the 7.0 OS.
>Ideally, Apple would release small code libraries (object code maybe?)
>that would do the Right Thing for things like the new FSSpec calls under
>both 7 and 6.

The current interfaces do help a bit; in particular, Gestalt and
FindFolder can be used without regard to the system being run
because of the glue which is automatically supplied (at least
by the MPW and Think C and Pascal compilers.)

If your main desire is for FSSpecs, it's easy to write wrapper
functions.  Alternatively, most FSp---- and Alias Manager calls
are available under System 6.0.7 if QuickTime is installed, so that
is one way to modernize old system versions.

Grobbins             grobbins@apple.com

Usual disclaimers apply.
From: lari@strauss.cs.unc.edu (Humayun Lari)
Newsgroups: comp.sys.mac.programmer
Subject: Re: What does DrawPicture() want?
Date: 29 Sep 92 00:46:20 GMT
Organization: The University of North Carolina at Chapel Hill

In article <1r#pbzf.stever@netcom.com> stever@netcom.com (Steve Riggins) writes:
>In article <15669@borg.cs.unc.edu> lari@strauss.cs.unc.edu (Humayun Lari) writes:
[my problem with DrawPicture and the TCL deleted]
[Steve suggested increasing the stack]

Actually, DrawPicture seems quite happy now. I'm asking it to draw 100x100
pixel thumbnails of screen snapshots that were taken in 16-bit color, and it's
shrinking and dithering them to 8-bit color with no problem. The application
partition is only 384K -- the pictures themselves would take up that much
memory if they were uncompressed -- but it's drawing them quite happily
(from disk, no less!)

>Copybits uses
>the stack, so often, 32K is not enough. Try and addition 64K.

If I remember correctly, the latest versions of CopyBits divide up their work
so that they can do the job even if there isn't sufficient stack space, and
even allocate memory if necessary. I hope that's true; otherwise, I guess
I'll be increasing the stack size soon...

Humayun Lari
(lari@cs.unc.edu)
From: rgaros@bio.vu.nl (Rene G.A. Ros)
Newsgroups: comp.sys.mac.programmer
Subject: Gestalt Info wanted
Date: 6 Oct 92 14:03:32 GMT
Organization: VU Biology, Amsterdam, The Netherlands


Some time ago I posted an article here because I wanted to
know more Gestalt selector codes, additional to those in
Inside Macintosh VI. I found some in other docs and by
searching for trap addresses in different files.
You can see these additional ones by using
'finger rgaros@bio.vu.nl'.
Some are valid codes but the meaning of the return value
is unknown. If you can add any information to this list
please mail me.

Thanks,
Rene

************************************************************
Rene G.A. Ros                         Amsterdam, Netherlands
rgaros@bio.vu.nl                    rgaros@nikhefk.nikhef.nl
************************************************************
My English is niet very well en ook nog not so snel,
but that comes later wel.
************************************************************