HDTenEightyP/NetNews huggingface dataset:
From: cash@uri.csmil.umich.edu (Howard Cash)
Subject: Need init to catch keystrokes
Date: Wed, 12 Aug 92 20:13:43 EDT
Organization: Cognitive Science and Machine Intelligence Lab, U. of MIichigan
Summary: Seeking source code
Keywords: n

I've never had occasion to write an init or patch a trap.  Perhaps 
this is a simple task:  Can someone send me code to catch keystrokes
from WHATEVER application happens to be running and calls SysBeep each
time the '~' key is typed?

Thanks for any help.  Please mail responses to me directly.

Howard Cash
cash@csmil.umich.edu

Newsgroups: comp.sys.mac.programmer
From: heyes@dadev.cebaf.gov (Graham Heyes)
Subject: more about Multifinder?
Organization: Continuous Electron Beam Accelerator Facility
Distribution: comp.sys.mac.programmer
Date: Wed, 19 Aug 1992 19:12:07 GMT

I need some information about Multifinder and don't
know where or if it is availible. Basically how does
Multifinder keep track of applications currently
installed, which is in the forground etc. There must
be a data-structure or some other mechanism availible
somewhere sence I have seen INIT's which install a 
menu from which an aplication can be selected, like
the system 7 application switching menu. 
	I have inside mac I-V, the USENET programmers
guide and all the Apple tech notes but none of them
give any information on how to extract this kind of
information or on the format of the MultiFinder 
partitions.

	Any pointers to mor information sources or
the information needed itself would be a great help.

	Thanks 
		Graham Heyes.

P.S. I know all this changes when you move to system
     7 but I haven't moved yet and may never do so..
     The system I have now will most likely be the one
     I will always have unless 7.x is less of a hog
     of system resources.
From: hp48sx@wupost.wustl.edu (HP48SX Archive Maintainer)
Newsgroups: comp.sys.mac.programmer
Subject: Beta testers wanted
Date: 13 Aug 1992 09:50:01 -0500
Organization: Washington University in Saint Louis, MO USA
NNTP-Posting-Host: wuarchive.wustl.edu

I am working on a very fast drag-n-drop compressor. I did not like the
automatic compression of AutoDoubler, nor the amount of memory
AutoDoubler/DiskDoubler takes.

If I use large buffers (that is around 300k for the program), then I get
speeds about 10% faster than DiskDoubler using AutoDoubler compression
in its foreground only mode.  And I have not rewritten the
compression/decompression in assembler yet (this will happen
eventually).  In this mode I have a 3.200.000+ bytes large file that
compresses in 25 seconds on my SE/30, and decompresses in 15.

I want the beta testers to try it out, but also to give me some feedback
on improvements and user interface issues. Currently it is drag-n-drop
with no GUI at all. Errors are displayed using DebugStr, so you should
be one of those always having a debugger installed.

-- 
Povl H. Pedersen             hp48sx@wuarchive.wustl.edu
HP48sx archive maintainer

All Opinions (C) Copyright the Intergalactic Thought Association
Newsgroups: comp.sys.mac.programmer
From: santadog@isys.kingston.ac.uk
Subject: out of memory in ThC 5 when dbugging
Organization: kingston university
Date: Fri, 21 Aug 1992 15:07:38 GMT

SCENARIO:
I am trying to use a copy of Think C 5 to debug someone else's code (I would
normally use MPW). He has taken his manuals home and has gone on holiday,
leaving me with the problem of not really knowing how to run the debugger (or
much else for that matter, but mostly I have worked it out).

PROBLEM DEFINITION:
When I mark the 'Use debugger' menu item in the Project menu and then select
Run (after marking the appropriate source files in the Project window) I get
the following (debugger) message:

'out of memory'

THINGS I HAVE TRIED:
I have tried setting Think C to anything up to a 7Mb  partition and then I
tried setting the debugger 'application' to 2Mb and also increasing the
partition for the actual project to double what it should be (normally 750k). I
have increased the VM to 13 Mb without any other applications running and I
still get the same error in all these separate cases. ???
I have a MacIIci, system7.1.1, 8Mb RAM. am trying to use ThinkC ver 5.0.

Can anyone help, please ?

Simon Lucas
School Of Information Systems
Kingston University
santadog@isys.kingston.ac.uk
From: cnc@Apple.COM (Chris Christensen)
Newsgroups: comp.sys.mac.programmer
Subject: Will there be a THINK C 6.0?
Summary: Will there be a 6.0 version of THINK C? When?
Date: 17 Aug 92 16:31:04 GMT
Organization: Apple Computer Inc., Cupertino, CA


Anyone know any info about THINK C 6.0? 
When and what?
Really C++ compatable?
From: gregt@function.mps.ohio-state.edu (Gregory M Ferrar)
Newsgroups: comp.sys.mac.programmer
Subject: Re: THINK Reference
Date: 21 Aug 1992 12:25:03 -0400
Organization: Department of Mathematics, The Ohio State University
NNTP-Posting-Host: function.mps.ohio-state.edu

> I was wondering how I could get THINK Reference? I purchased THINK C 5.0,
> but I haven't registered it yet... do I et it when I register? Or is it
> shareware? or...? Thanks...

Unfortunately, neither.  It is a commercial product, available from most
places that sell Think C.  It's worth the cost, though.

  -Greg Ferrar (gregt@function.mps.ohio-state.edu)
Newsgroups: comp.sys.mac.programmer
From: killer@wimpy (karl kowalski)
Subject: Unhighlighted Static Edit Text Fields and Hierarchical Popup Menus
Keywords: Edit Text hilighliting Menus hierarchical popups
Organization: The Aerospace Corporation; El Segundo, CA
Distribution: general
Date: Thu, 20 Aug 1992 18:07:51 GMT

Hi!

Sorry to be bringing a possibly trivial question to the net (and hopefully
it's not a RT(F)M answer), but...

Anyone have the time to explain how to make static and edit text fields
in a dialog box unhighlighted (and thus, user-inaccessible)? The Control 
Manager doesn't like it 
when I do

	GetDItem( theDialog, EDIT_TEXT_ITEM, &type, &handle, &rect );
	HiliteControl( (ControlHandle)handle, INACTIVE );

something about a Bus Error shows up in SADE. It doesn't mind when I
do the same thing to a static item, although that doesn't do what I want
anyway. Clearly it can be done; MPW's Create Build dialog has items
that are highlighted or not dependent upon the setting of a group of
radio buttons. I can do HideDItem and ShowDItem (to work around the
problem) but I'd really really really prefer the hilit/unhilit state.

In another channel, how can I make a popup menu have a submenu on
one or more of its items? I know the guidelines say "Thou shouldst not"
but I think I have a reasonable reason for it (and I'd like to see if
I can do it anyway - programming for programming's sake). It seems
like it should be doable - using SetItemCmd and SetItemMark on the
popup menu item I want sub'ed, but I haven't gotten it to work so far.
Any hints?

Please respond via email to the address below. I'm not sure my machine
sets its reply-to address correctly.

Cheers,

Karl G Kowalski
killer@wimpy.aero.org
From: spencer@cgrg.ohio-state.edu (Stephen N. Spencer)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Help w/files needed...
Date: 20 Aug 92 15:30:53 GMT
Distribution: usa
Organization: OSU Advanced Computing Center for the Arts and Design

In article <l-hyzaq@rpi.edu> raffuj@aix.rpi.edu (Jose A. Raffucci) writes:
>I need to open a file, write to it using standard text i/o stuff, and 
>close it up again.  I figure fopen() and fclose() work ok since they're
>in the standard library, but how can I use them with the standard filre
>requestors?  
>

Here is an article posted by Bill Coderre in late 1990 that does what you want:

---
Here is a fragment of Think C that allows Think's <stdio> lib and Mac's
Standard File dialogs to be intermixed:

	/* Open the input file. */
	MyTypes[0] = 'TEXT';
	SFGetFile(SFGWhere,NIL,NIL,1,MyTypes,NIL,&reply);
	if (!reply.good) return;
	SetVol(0L, reply.vRefNum);
	strcpy(inFileName,reply.fName);
	PtoCstr(inFileName);
	inp = fopen(inFileName,"r");
	if (inp == NULL)
	{
		strcpy(&sTemp,"Can't seem to open input file: ");
		strcat(&sTemp,inFileName);
		ParamText(CtoPstr(sTemp),"\p","\p","\p");
		A_Lose();
		return;
	};

The function A_Lose puts up an "uh-oh" alert and effectively aborts the
program. Primitive but functional errorchecking. 

I got this idea and almost all the code itself by calling Think C's tech
support people. Thanks guys.
---
-- 
Stephen N. Spencer, Graphics Research Specialist           ,__o      ,__o
spencer@cgrg.ohio-state.edu  (or spencer@siggraph.org)   _-\_<,    _-\_<, 
(614) 292-3416                                          (*)/'(*)  (*)/'(*)
Newsgroups: comp.sys.mac.programmer
From: zben@ni.umd.edu (Charles B. Cranston)
Subject: Re: InitDialogs [Q]
Followup-To: comp.sys.mac.programmer
Organization: UM Home for the Terminally Analytical
Date: Thu, 20 Aug 1992 19:44:06 GMT

> robert_hess@macweek.ziff.com ("Robert Hess") writes:
> ... What's wrong with calling InitDialogs from within an INIT? ...

In article <71422@apple.Apple.COM>, stevec@Apple.COM (Steve Christensen)
wrote:
 > ... Typically you need to call the following routines first:
> 	InitGraf	(QuickDraw)
> 	InitFonts	(Font Manager)
> 	InitWindows	(Window Manager)	
> 	TEInit		(TextEdit)
> and -then-
> 	InitDialogs	(Dialog Manager)

The InitWindows has the cosmetically ugly side effect of
repainting the desktop, wiping out the "icon parade" of all
the other inits that have run before this one.  Does anybody
have a clean work-around around for this?

zben@ni.umd.edu     -KA3ZDF
Newsgroups: comp.sys.mac.programmer
From: joshr@kronos.arc.nasa.gov (Joshua Rabinowitz-Summer-91)
Subject: Re: Pointer exercise works on Sun but not on Mac: Why?
Organization: NASA/ARC Information Sciences Division
Distribution: usa
Date: Thu, 13 Aug 1992 18:33:01 GMT

In article <4439@news.duke.edu> tasavard@phy.duke.edu (Tom Savard) writes:
>
>I am learning how to program C with my Mac IIsi.  I wrote a program to test
>my understanding of pointers.  The program works on our Sun but not on my
>Mac with Think C 5.02.  I have tried turning off optimizations but the
>program never works perfectly.  Sometimes it bombs when assigning the
>pointers in the loop and sometimes at the end.  I have tried removing all
[some deleted info>


You must also #include <stdlib.h>, then it will work perfectly (I tried it).
Admit it had me stumped for a moment.

Also, on macs, double precision math is _faster_ than math on floats.

joshr@kronos.arc.nasa.gov


-- 
----------------------------------
#include <std/disclaimer.h>     Josh Rabinowitz, Mac TCL programmer
joshr@kronos.arc.nasa.gov
"'I see', said the blind carpenter, as he picked up his hammer and saw".
From: cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Weird Quickdraw Bug w/ Geneva
Date: 18 Aug 1992 17:41:18 GMT
Followup-To: comp.sys.mac.programmer
Organization: Academic Computing

In article <1992Aug18.165219.3514@hobbes.kzoo.edu>, k044477@hobbes.kzoo.edu
(Jamie R. McCarthy) wrote:
> 
> cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton) writes:
> >I've run into a VERY odd "feature" with a relatively simple piece of code.
> >
> >When 9 pt. Geneva is used, the text comes out as a
> >VERY pale yellow (instead of the expected black). If any font besides
> >Geneva is used, or any any size of Geneva BESIDES 9 pt, there is no
> >problem.
> >

> Sounds like you're messing with the screen's color table, and not
> letting the system know that you're doing it.
> 
> Theoretically, there's no way you can do this :-) if you're using the
> Palette Manager exclusively, and if you're not directly editing the data
> in the system's data structures.  If you grab a GDevice's color table
> and shove your own data into it without calling CTabChanged() or
> changing its ctSeed, you'll experience effects exactly like those you
> explain.
> 

OK, that makes sense. I am certainly NOT doing it on purpose. The only
color environment changes I THINK I'm making involve getting the palette
associated with a window and using SetPalette to assign the same palette to
several other windows (but not the one with the problem). ActivatePalette
is being called whenever a particular window with a custom palette becomes
active. Anything other than that is purely accidental. If I read you right,
you're saying that something is happening to the entire display (gdevice),
and not just individual windows, correct?

Do you have any suggestions as to how this color corruption might be
happening? Maybe calling SetPalette on a window that isn't open?

--_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Chuck Shotton                      |    
Ass't Director, Academic Computing |       "This space for rent."
UT Health Science Center Houston   |  
cshotton@oac.hsc.uth.tmc.edu       |         
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Newsgroups: comp.sys.mac.programmer
Subject: Re: When to lock handles
From: stanger@otago.ac.nz (Nigel Stanger)
Date: 23 Aug 92 15:14:20 +1300
Organization: University of Otago, Dunedin, New Zealand

francois@welchgate.welch.jhu.edu (Francois Schiettecatte) writes:
> 
> Does anyone know when I can find (or can offer) some guidelines
> (preferably available through ftp) about when to lock handles
> when reading data from them or writing data to them.

Assuming you've got Inside Mac, either the Memory Intro chapter
in vol. 1 or the Memory Manager in vol. 2 give a list of places
where you should lock handles. This is actually for Lisa Pascal
-- but I assume it still applies?

----------------------------------------------------------------------
Nigel Stanger,                  Internet: stanger@otago.ac.nz
University of Otago,            Phone: +64 3 479-8179
Dunedin, NEW ZEALAND.           Fax:   +64 3 479-8311
Prong prong prong.
From: grobbins@Apple.COM (Grobbins)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How do I find the Preferences folder?
Summary: FindFolder uses the System folder for prefs under Sys 6
Date: 19 Aug 92 08:18:48 GMT
Organization: Macintosh Software Architecture Division

In article <D88-JWA.92Aug18233002@dront.nada.kth.se> d88-jwa@dront.nada.kth.se (Jon W{tte) writes:
>> rich@grayhawk.rent.com (Richard Harms) writes:
>   Doesn't 6.0.X have a better way to do this than having to hard-code the name
>   Preferences which might (will) fail on some International systems?
>
>Nope, the official word is:
>1) For system 6, use the name "Preferences" NO MATTER WHAT
>COUNTRY YOU ARE IN.  ...
>2) Under system 7, be SURE to use FindFolder for the kPreferencesFolderType
>and DON'T depend on the name of the folder.

I generally recommend that applications use the FindFolder glue under
System 6, or at least imitate it.  FindFolder returns the dirID of the
System folder under System 6 rather than attempt to make a preferences
folder.  So under System 6, just put preferences where FindFolder says
the proper place for them is, the System folder.

Under System 6, the FindFolder glue will also return the dirID of the
System folder for most of the other "special" System 7 folders (Extensions
and so forth.)  Clutter is endemic to System 6, and there really is no 
standard for avoiding it.  You can just punt the issue by using FindFolder
under System 6 as you would under System 7, and leaving it at that.

Grobbins                         grobbins@apple.com

Usual disclaimers apply.
From: sold@kit.uni-kl.de (Christoph Sold)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How do I read many keys down?
Date: 14 Aug 92 20:27:00 GMT
Organization: Universitaet Kaiserslautern

In article <2482@nic.cerf.net> cutrell@nic.cerf.net (Doug Cutrell) writes:
>Subject: How do I read many keys down?
>From: cutrell@nic.cerf.net (Doug Cutrell)
>Date: 10 Aug 92 18:16:08 GMT
>I am writing a game and I want to implement an interface
>that allows for the user pressing several keys at once.
>That is, the user holds down lots of keys at once and
>I need to be able to tell which ones are down.  I know
>about GetKeys, but the FAQ list for this group states that
>at most two non-modifier keys will be reported at any
>given time.
> 
>Is there any way around this, say by querying
>the keyboard through the ADB directly?  Or is this a
>hardware limitation of the keyboard?
> 
>Thanks,
>Doug Cutrell
>cutrell@cerf.net
>

Doug,

take a look into Inside Macintosh, and look for "Keymap". Unfortunately, 
there is a hard limit of simultaneos keydowns on smaller maps, since the 
keys sit in a matrix, which is scanned by software at interrupt time. Thus, 
you cannot decode three keys simultaneosly down if these sit in only two row|
column combinations.

Btw: I think games nedding more than command and option key as modifiers and 
mouse btn as initiator of actions are poorly designed.

-Christoph

Christoph P. Sold                   CATS Software GmbH
                                    Mussbacher Landstr.2
                                    W-6730 Neustadt (Weinstrasse)
ger.xse0035@applelink.apple.com     Germany

"If an apple is fun, what the heck is an appletree?"
From: gluttony@reed.edu!gluttony.reed.edu!pcalahan (Patrick John Calahan)
Newsgroups: comp.sys.mac.programmer
Subject: HELP: Color mapping and copybits
Date: 13 Aug 92 00:56:15 GMT
Article-I.D.: gluttony.m0mITTz-0006ChC
Organization: Reed College, Portland, OR

I have two offscreen pixmaps, one 4bits deep and one 8bits deep.
Each has its own color table of 16 and 256 colors respectively.  I want to  
be able to copy one to the other with copybits and have the colors
be mapped using the color tables (im using apple standard colors for
both tables).  The problem is, as I understand it, copybits uses the
current gDevice's color table for the destPixmap.  What do I do?
From: gb2a+@andrew.cmu.edu (George J. Baxter)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Dear Mr. Sculley
Date: 12 Aug 92 05:05:13 GMT
Article-I.D.: andrew.keWEm9y00WBK41PWNq
Organization: Science & Technology Center, Carnegie Mellon, Pittsburgh, PA

Dear Mr. Sculley (via the graces of Travis Grundke),
    I once saw an article in MacWeek about how Apple was 'responding to
consumer demand for more frequent upgrades' for the Apple computers.  As
a developer, this didn't make much sense to me.  Eg. we bought two
Quadra 900s, and before we could even get the machines set up, somebody
gives me an article announcing the Quadra 950.  My response, of course,
was "AAAAAAAAAAARRRRRRRRRGGGGGGGGG!!!"  Why didn't Apple just do it
right the first time?  I've been very happy working with Apple, but this
concept is NOT a response to consumer demand, but a evil marketing
scheme.  Please, go ahead and take your time, release a good upgrade the
first time, and help us prevent strained vocal cords.
                            Sincerely,
                                    George Baxter
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.wanted
From: tendico@hubcap.clemson.edu (Todd Endicott)
Subject: Graphing Libraries
Organization: Clemson University
Date: Tue, 18 Aug 1992 20:35:30 GMT

  Greetings! Short and simple: I'm looking for a C/C++ library of
graphing routines for the Mac. Nothing fancy, just lines, bars, pies, etc.
Needs to be System 7-compatible. Thanky.
-- 
Todd Endicott
tendico@hubcap.clemson.edu					 "Yow!"
From: mlanett@Apple.COM (Mark Lanett)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Storing a reference to a file ..
Date: 17 Aug 92 15:32:20 GMT
Organization: Apple Computer Inc., Cupertino, CA

rson@rhi.hi.is (Reynir Hugason) writes:

>Ok here is the scenario: I have a project file. I want to store from within
>the project file, which files are included in the project and some info
>about each file. Presently I simply take the FSSpec and save it; however,
>this is not suffiecent. What happens is that my program cant find files
>if I start up from another disk. The only solution I can imagine is to
>store the volume name and perhaps creation date of the volume as well ANDOR
>use these file id things.

>How would you do it?

Save an alias. If all the files are in the same folder as the project file, you
can make their aliases _relative_ to the project file, which should work even
when you move all the stuff to a different disk.
-- 
Have a bajillion brilliant Jobsian lithium licks.
Mark Lanett, NOT speaking for anyone. Personal opinion only.
From: kees@ooc.uva.nl (Kees de Ridder)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How to change sound volume? Help please!!!
Date: 18 Aug 92 12:20:12 GMT
Organization: Center for Innovation and Cooperative Technology, University of Amsterdam

hd12@ellis.uchicago.edu (hui  dong) writes:

>I need to know how to change sound volume, I tried to change the global
>SysParam.volClik, but nothing happens, and after I WriteParam(), the mouse
>double click time is not right after I reboot. Well, something must be very
>wrong here. Any help will be very appreciated!
You should use SetSoundVol (see inside mac II-233

Hope this helps
Kees de Ridder


Newsgroups: comp.sys.mac.programmer
From: k.vikor@alf.uib.no (Knut S. Vikor)
Subject: Re: Localized System software
Followup-To: comp.sys.mac.programmer,comp.sys.mac.system
Organization: University of Bergen
Date: Mon, 17 Aug 92 12:21:46 GMT

In article <1992Aug12.164152.8934@Csli.Stanford.EDU>,
francis@csli.stanford.edu (Dave Francis) wrote:
> 
> This question may have two answers given the release of system 7.1 (Cube-E).
> 
> How does one tell if the System running is Japanese or Persian or
> whatever? Does this change with the introduction of system 7.1?
> 
> Thanks,
> Dave Francis

If the System contains an non-European script, you will see the script icon
in the menu bar (crescent for Arabic, sun for Japanese, diamond for US,
various flags for the European countries, etc.) There is no reason this
will change in System 7.1 that I can think of.

Knut S. Vikor.
Centre for Middle Eastern and Islamic Studies
University of Bergen, Norway
From: minow@Apple.COM (Martin Minow)
Newsgroups: comp.sys.mac.programmer
Subject: Re: TextEdit:  Breaking the 32K limit (MPW)
Date: 19 Aug 92 16:53:13 GMT
Organization: Apple Computer Inc., Cupertino, CA

In article <6283@ucru2.ucr.edu> ezix@ucrengr.ucr.edu (edward j. zix) writes:
>Has anyone had any luck in breaking thehistorical limit of 32K of text in
>TextEdit?

Sorry, it probably can't be done. TextEdit stores all text in a single Handle
and uses a signed short for its length. It also is very inefficient for large
blocks of data.

You might try one of the 3rd party utility libraries, such as Word
Solution Engine; perhaps it will solve your problems. Also, the Programmer's
Editor Package offered by Rich Siegel (siegel@world.std.com) is probably
worth looking at.

Martin Minow
minow@apple.com
The above does not represent the position of Apple Computer Inc.
From: mark@bilpin.co.uk (Mark Allerton)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Finder labels
Date: 20 Aug 92 11:02:34 GMT
Organization: UK Mac DTS/SRL Data
X-Useragent: Nuntius v1.1

In article <1992Aug18.165308.11735@terminator.cc.umich.edu> ,
leonardr@ccs.itd.umich.edu writes:
>	IconDispatch is the trap that the new (Sys7) Icon Manager (also known
>as IconUtils) has allocated to it.  the Icon Manager (as documented in a
>tech note somewhere) is what Finder 7, the Chooser, the Notification
Manager,
>the CTB, etc. all use to display "Icon Families" which includes the new
types
>of icons (icxx) introduced for Sys7.

It's Tech Note 306 "Drawing Icons The System 7 Way"

Mark Allerton
UK Mac DTS
mark@bilpin.co.uk