HDTenEightyP/NetNews huggingface dataset:
Newsgroups: comp.sys.mac.programmer
Subject: Mac keyboard driver?
From: bennett_w@kosmos.wcc.govt.nz (William Francis Bennett)
Date: 26 Jan 1993 08:18:39 GMT
Reply-To: bennett_w@kosmos.wcc.govt.nz
Organization: Wellington City Council (Public Access), Wgtn, Nz
NNTP-Posting-Host: kosmos.wcc.govt.nz

I'm porting an application from Windows to Mac, so far with a lot of success,
but I can't find any reference to the Mac's keyboard driver.

Is there such a thing?

If not, where does one go to find out how to tinker with whatever part of the
system software reads keyboard commands?

In particular, I'm looking to read a keystroke sequence - such as the plus key
followed by the star key (on the numeric pad) to trigger an action.

Any ideas?

**** HOLD THE FRONT PAGE **** EX-PAT POM JOURNO IN KIWI LOVE NEST SAGA **** 
                                                                              
William Francis Bennett                  | You cannot hope to bribe or twist, 
BENNETT_W@kosmos.wcc.govt.nz             | Thank God!, The British Journalist
PO Box 2613, Wellington, New Zealand     | But seeing what that man will do
Fax: 64/4/499-3431                       | Unbribed, there's no occasion to.
_____________________________________________________________________________       
Newsgroups: comp.sys.mac.programmer
From: neeri@iis.ethz.ch (Matthias Neeracher)
Subject: Re: CSMP One-liners (Request for updates)
Organization: Integrated Systems Laboratory, ETH, Zurich
	<1993Jan14.174448.25614@kth.se>
	<1993Jan18.043421.3018@ccu1.aukuni.ac.nz>
	<1993Jan18.140502.17994@kth.se> <1993Jan21.172517.13363@waikato.ac.nz>
Date: Thu, 21 Jan 1993 23:28:19 GMT

In article <1993Jan21.172517.13363@waikato.ac.nz>, ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
> In article <1993Jan18.140502.17994@kth.se>, d88-jwa@hemul.nada.kth.se (Jon Wtte) writes:
>>
>>>>Also: The HXXX calls are available from System 3 and up.
>>
>>>I thought it was 3.2 or 3.3 where HFS showed up? Perhaps my memory is
>>
>> 3.2, I think.

> It was 3.0 (the first system released to support the Mac Plus). However,
> the system didn't actually have HFS in it, since that was built into the
> Mac Plus ROM.

> 3.2 was just the first version of 3.x that was worth using. :-)

Agreed. 3.0 had a reputation of erasing any file that got in its way.
Maybe we should add a one-liner:

Don't bother supporting System 3.0, 3.1, 4.0, or 6.0

(Which doesn't mean that none of the other versions were unreliable, but
I think the above gang of four were the real releases from hell).

Matthias

-----
Matthias Neeracher                                      neeri@iis.ethz.ch
  "Macintosh System 7.1 -- just say no.  If I'd wanted to pay for OS
   upgrades, I'd have bought an IBM." -- mathew@mantis.co.uk
Newsgroups: comp.sys.mac.programmer
From: christos@molbio.cbs.umn.edu (Christos Hatzis)
Subject: Re: Book about TCL?
Organization: University of Minnesota
X-Newsreader: Tin 1.1 PL5
Date: Sun, 24 Jan 1993 23:03:44 GMT

:  I received the following inquiry from a colleague.  I have not used the TCL
:  myself.  He is using THINK C 5.0.4.
 
:  --------------
:  Hi Chuck. Do you know of a book (or other source of information) that
:  can give me a better idea of how to use TCL. I find the manual to be
:  pretty useless; most of the time I find information by looking though
:  the source code, which defeats the purpose, because it provides me
:  with no abstraction.
:  --------------
 
:  Any opiinions or recommendations?  All info will be greatly appreciated.
 
 
:  Chuck Hoffman
:  chuck@gte.com
:  GTE Laboratories, Waltham, Massachusetts, USA
:  (617) 466-2131

I've heard that there is a new book out on TCL programming w/ Think C 
and Think Pascal.  The book is: "Easy Object Programming" by 
Richard O. Parker and is published by Prentice Hall. The ThinkC version 
sells for $35.00 including a disk.  The Pascal version is not out yet.

Christos Hatzis
BPTI, University of Minnesota

Newsgroups: comp.sys.mac.programmer,comp.sys.mac.apps
From: pao@wam.umd.edu (Nikos Strifas)
Subject: Mac Programming problem
Keywords: mac,toolbox
Organization: Workstations at Maryland, University of Maryland, College Park
Distribution: usa
Date: Mon, 25 Jan 1993 19:35:32 GMT


I'm programming in the Mac toolbox environment with FutureBASIC (formerly
ZBASIC) and would like to eliminate the menu bar from the screen.  I'm
sure it can be done since Hypercard provides for it and a number of
applications I have seen do it.  Can anyone help me out with the technique
for accomplishing this?

Thanks...
         N. Strifas
From: eric.larson@f620.n2605.z1.ieee.org (eric larson)
Newsgroups: comp.sys.mac.programmer
Subject: Why the Piracy? Here's why...
Date: 24 Jan 93 03:04:06 GMT
Organization: FidoNet node 1:2605/620 - Shockwave Rid, Freehold NJ


 # I believe you missed something.  If it weren't for trade secrets,
 # patents, and copyrights, writing software would be trivial; if I needed
 # a fast algorithm for blitting on a Mac, for example, I'd just look it
 # up.

If it weren't for patents and copyrights, all you would have is trade secrets.
You don't look up trade secrets. Patents are all on file at the Patent Office,
and Copyrights are on file at the Library of Congress.

 # It is the very fact that we `protect' such information that causes it
 # to become so valuable

All information is valuable. There are two ways that have evolved to protect
it. 1). Keep It Secret. 2). Get the government to give you a license to it.

The patent and copyright system evolved as a contract between the inventor/
author and the government. The inventor gives up secrecy in exchange for a
license.

# everyone has to invest the time to reinvent it.

You DON'T have to reinvent it if it has been published.

--  
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
 eric larson - Internet: eric.larson@f620.n2605.z1.ieee.org
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@cyklop.nada.kth.se (Jon Wtte)
Subject: Re: More on TCL Nightmare.....................................
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Sat, 23 Jan 1993 23:47:16 GMT

In <93023.121559REE700A@MAINE.MAINE.EDU> REE700A@MAINE.MAINE.EDU writes:

>  Now, this amounts to 60,000 LongRects (hence 240,000 LongInt assigns,
>and 120,000 LongInt adds, so the math of generation is non-negigible.

>FillRect'ed them.

>  A simple scroll - refresh took 10 seconds on my SE/30 !  Obviously,
>this ain't no Quadra and it is a lot of drawing, but seriously...

Add the data accesses for drawing each item, and for the stack
to pass parameters to and fro, and the trap dispatcher, you'll
get a pretty hefty memory dependency (what's the cycle per
longword access in an SE/30? 120 ns?) PLUS you have a lot of
instructions even to just determine where the LongRects are,
do the trap, intersect with the window, clip, and maybe draw.
I don't think 10 seconds is in any way unreasonable, considering
what you're doing.

>  Any useful suggestions on how to speed this process up?

Yes, it's very simple; your Draw() method gets a Rect passed
to it; that Rect contains the area that actually needs to
be drawn. I don't know what data structures you have, but
some simple binary search over sorted coordinates, or some
other clever way of knowing what rectangles to draw without
checking each and every one would probably help tremendously.

>  BTW - HOW DO I GET THE DEBUGGER INTO THE EVENT HANDLING PORTION OF
>        MY APPLICATION WITHOUT MANUALLY SETING THE EVENT MESSAGE?

Uh? You mean break when getting an event, or just look at
a place in the code?

Open the relevant part in Think C, highlight a line you want
to have in the debugger, and press "Debug" (cmd-I) and the
debugger will go there.

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  _/~|   Yellow
 / * \_  Shark                      (This signature has won the "Worst ASCII
 ~~~~\/  Software                    Logo of the Year" award)
Newsgroups: comp.sys.mac.programmer
Subject: <1993Jan24.215738.9412@kth.se>
From: theeric@violet.ccit.arizona.edu (Eric Hegstrom - THEERIC)
Date: 24 Jan 1993 23:27 MST  
Distribution: world,local
Organization: University of Arizona
Keywords: Protection Keys 
News-Software: VAX/VMS VNEWS 1.41    

In <1993Jan24.215738.9412@kth.se> d88-jwa@cyklop.nada.kth.se (Jon Wtte)

>>I don't know about ADB devices but the company I used to program
>>for used read/writable protection keys for the SCSI port (transparent
>>to any devices I tried to hook up).

>1) I'm all out of SCSI devices
>2) I wouldn't trust anything that isn't a real SCSI unit
>   on any of my SCSI buses. All my important data goes there,
>   and some of that data needs to go there FAST.


Well, I can understand your concerns (I had the same ones myself).  The
program that I helped impliment the keys into, was a structural analysis one
that did a tremendous amount of database access over the SCSI port and
was used by various engineering firms.  After consulting with
MicroPhar we agreed to test one.  Although I never used all SCSI devices
(I just couldn't spare them on the test machine), but with 6 devices
(3 HDs, a CD, A Tape Drive, and a Syquest removable media HD) we did some
(what we viewed as) extensive testing and encountered no problems with any 
data loss/degredation (at least the 2000 or so analysis test yielded the
expected results). As to speed concerns: altough we did no tight bench-marking
there was no apparrent discrepencies in the run times of the test.

Ciao,
Eric Hegstrom

=============================================================================
All my opinions are disregarded. So they are not my employer's.

Eric Hegstrom                      personal: theeric@ccit.arizona.edu
c/o Hugish Software Association    business: hugish@aol.com
1718 E. Speedway #105
Tucson, Arizona 85719
TELE  (602)770-9650
From: eric.larson@f620.n2605.z1.ieee.org (eric larson)
Newsgroups: comp.sys.mac.programmer
Subject: Why the Piracy? Here's why...
Date: 24 Jan 93 03:31:07 GMT
Organization: FidoNet node 1:2605/620 - Shockwave Rid, Freehold NJ


 # Microsoft -- IMHO -- has never innovated, only copied, ripped off,
 # and so on. Our IP laws are paying people for doing bad things.

The problem is that you can't buy a C compiler for the Mac or MS-DOS from
AT&T. Whose mistake is that? Certainly not Microsoft's. Should we punish
Microsoft for filling a real need?

 # I wouldn't be surprised if this causes as much harm, in the long
 # term, as laws which benefit companies who move factories out of
 # the country and engage in leveraged takeovers and rationalizations,
 # all of which are slowly grinding the US economy into the dust.

One of the real problems the US has is that companies are inefficient in
bringing 'breakthrough' technologies to the marketplace. You DO NOT improve
this by making IP law protection for commercial technologies weaker, and
strengthen IP protection for basic R&D - this LESSENS the incentive to
commercialize a technology. The real benefit to an economy is from the
commercial enterprise - that is the manufacturing effort. The royalties on an
idea amount to a small percentage of the actual economic activity of the
manufacturing process.

--  
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
 eric larson - Internet: eric.larson@f620.n2605.z1.ieee.org
From: rolls@cis.umassd.edu (Frank Pinto)
Subject: Sys. error = 04
Organization: University of Massachusetts Dartmouth
Date: Wed, 27 Jan 1993 05:11:14 GMT

Hello all
Since I'm a beginner in this group and subject,
forgive me if I sound unknowledgeable.
My son copied something into a mac disk, when
he got home and tried to open the "hilighted"
icon he got a sys error =04 (Divide by zero)
How is the information od the disk
kept?

E-Mail me the answers , please

Frank Pinto
From: chuck@gte.com (Chuck Hoffman)
Newsgroups: comp.sys.mac.programmer
Subject: Book about TCL?
Date: 21 Jan 93 15:41:44 GMT
Followup-To: comp.sys.mac.programmer
Organization: GTE Laboratories

I received the following inquiry from a colleague.  I have not used the TCL
myself.  He is using THINK C 5.0.4.

--------------
Hi Chuck. Do you know of a book (or other source of information) that
can give me a better idea of how to use TCL. I find the manual to be
pretty useless; most of the time I find information by looking though
the source code, which defeats the purpose, because it provides me
with no abstraction.
--------------

Any opiinions or recommendations?  All info will be greatly appreciated.


Chuck Hoffman
chuck@gte.com
GTE Laboratories, Waltham, Massachusetts, USA
(617) 466-2131
=====================================
I'm not sure why we're here, but I am sure that while we're here we're
supposed to help each other.
=====================================
Newsgroups: comp.sys.mac.programmer
From: leonardr@netcom.com (Leonard Rosenthol)
Subject: Re: how to launch anything, like the Finder does...
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Mon, 25 Jan 1993 07:00:56 GMT

In article <01050133.oea6u6@distant.uucp> edw@distant.uucp writes:
>I would like to have a program I'm working on launch everything inside of
>a folder, exactly the way the Finder does when it starts up. Is there a
>way to do this that doesn't involve hundreds of lines of code? Can I use a
>Finder Apple event to do somthing like this? BTW, when I say "everything,"
>I mean everything, including sounds, etc. This seems to be a job for Finder
>events, the more that I think about it...
>
	This is EXACTLY a job for Finder events - use the 'osel' Apple event
to get the Finder to open the file(s) for you.

-- 
-----------------------------------------------------------------------------
Leonard Rosenthol			Internet: 	leonardr@netcom.com
Director of Advanced Technology		AppleLink:	MACgician
Aladdin Systems, Inc.			GEnie:		MACgician
From: Arne.Venstad@DELAB.SINTEF.no (Arne Venstad)
Subject: DoubleTrouble in ShowList!
Followup-To: comp.sys.mac.programmer
Organization: SINTEF DELAB
Date: Thu, 28 Jan 93 09:56:01 GMT

Triggered by the discussion on how to validate Handles in this group,
I yesterday loaded the extension "DoubleTrouble" by Greg Marriott, Apple.
It worked great! I found a serious (and difficult to detect) bug in a
XFCN I have written in C. Thanks to Greg and Apple for a very useful
utility! (The DoubleTrouble can be found on the latest Developer CD from
APDA).
Today I found another double trouble, this time in the XFCN "ShowList"
which is distributed with HyperCard 2.1. The stack dump from MacBugs
reports DisposHandle was called from ShowList + 0010, when DoubleTrouble
breaks in. Anybode else who have seen this?

Arne Venstad        Internet: Arne.Venstad@delab.sintef.no
SINTEF DELAB
N-7034 Trondheim,
Norway
From: lward@husc11.harvard.edu (Lester Ward)
Newsgroups: comp.sys.mac.programmer
Subject: Running XCMDs from C code?
Date: 23 Jan 93 04:11:14 GMT

I would like to be able to include the ability to run XCMDs or similar
modules within an applictaion I am writing.  A few questions:

1) Is this legal?  The XCMD format is standard, but is building the
ability to run them reserved for HyperCard?

2) How the hell would I do this?  What would standard code be to get
the XCMD to execute?  I'm not so interested in the message passing part
as I am in just getting the XCMD to run.

3) Is there any other standard or method for doing something like this?
XTNDs maybe?  Just with plain old CODE resources?  The modules don't
have to communicate with the app in any way (but could through AppleEvents,
maybe), just be executable by the app and insertable into the app
by a user who does not have access to the source code.

Thanks,
Les
Newsgroups: comp.sys.mac.programmer
From: keith@taligent.com (Keith Rollin)
Subject: Re: Calling external code resources - how?
Followup-To: comp.sys.mac.programmer
Organization: Taligent
Date: Mon, 25 Jan 1993 01:59:02 GMT

In article <01050014.odph61@blanc.north.de>, jochen@blanc.north.de (Jochen
Meyer) wrote:
> 
> I am currently writing a program that I want to be extensible. The
> most common way of handling extensibility seems to be using external
> code resources, like in Canvas or BBEdit.
> 
> Where can I find information on how to do this? The Segment Manager
> chapter of IM gives no clues on this. Anyone has got some sample code
> on this?

If you have Technote #256, read it. If you don't, log onto ftp.apple.com,
go to /dts/mac/tn/patforms.tools and download the file called
stand-alone-code.hqx. It will tell you just what you want.

Just to whet your appetite, here's some code that I use to call CDEF's
directly:


typedef pascal long (*CDEFProc)(short varCode, ControlHandle theControl,
									short msg, long param);

long CallCDEF(ControlHandle theControl, short msg, long param)
{
	CDEFProc*	defProcHandle;
	GrafPtr		oldPort;
	char		oldState;
	long		result;
			
	defProcHandle = (CDEFProc*) StripAddress((**theControl).contrlDefProc);

	if (defProcHandle != nil) {

		if (*defProcHandle == nil)  {
			LoadResource((Handle) defProcHandle);
		}

		if (*defProcHandle != nil) {
		
			GetPort(&oldPort);
			SetPort((**theControl).contrlOwner);
			
			oldState = HGetState((Handle) defProcHandle);
			HLock((Handle) defProcHandle);
			
			result = (*defProcHandle)(GetCVariant(theControl), theControl, msg,
param);
										
			HSetState((Handle) defProcHandle, oldState);
			SetPort(oldPort);
			
			return result;
		}
	}

	SysError(dsCDEFNotFound);
}


-----
Keith Rollin
Phantom Programmer
Taligent, Inc.
Newsgroups: comp.sys.mac.programmer
From: UC525655@mizzou1.missouri.edu (M.Eaton)
Subject: (Q) App works with think debugger, but not w/o
Organization: University of Missouri
Date: Fri, 22 Jan 93 19:05:03 CST

Hi-
I'm using Think C 5.0.4. I'm writing an app that draws icons from the
files on the floppy, and then tracks click downs (a la finder).
When I detect a mouseDown, I check my global gItemHilited to see if
I had already hilited a file, if I did, I de-hilite it. Then I see
if the click-point was in the icon by calling PtInIconSuite(). At
any rate, everytihing works fine with my app while I step through it
with the debugger, but when I clear breakpoints and go, or when I
run without the debugger, It hilites one icon, then won't unhilite it
or hilite any new icons... What is the debugger doing for me???
 
 
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Eaton                    |
UC525655@MIZZOU1.MISSOURI.EDU |             Eat at Joe's.
                              |
From: Chewy@cup.portal.com (Paul Frederick Snively)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Can background-only apps use the Notification Manager?
Date: Thu, 28 Jan 93 11:02:01 PST
Organization: The Portal System (TM)

>Can background-only applications use the Notification Manager?

Yes.  Just remember that you'll have to be rather rude, e.g. show an alert
instead of blinking an icon and letting the user bring you to the front,
because you _can't_ be brought to the front.

Paul Snively
AppleEvent Daemon Conjuror Extraordinaire ;-)
Chewy@cup.portal.com
Newsgroups: comp.sys.mac.programmer
From: asunta@convex.csc.FI (Miika Asunta)
Subject: AfterDark modules?
Organization: Sibelius Academy, Helsinki
Date: Mon, 25 Jan 93 18:07:47 GMT

Where can I find C headers and documentation
how to write afterdark modules? Is it included in the package?
--
Miika Asunta
asunta@convex.csc.fi			Double Bass Player
tel. +358-0-494 093			Macintosh Programmer
From: absurd@apple.apple.com (Tim Dierks, software saboteur)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Hiliting with the hilight color??? Problem
Date: 21 Jan 93 16:12:49 GMT
Followup-To: comp.sys.mac.programmer
Organization: MacDTS Marauders

In article <pcw.727626961@digex>, pcw@access.digex.com (Peter Wayner)
wrote:
> 
> I've been having problems with hilighting some text using
> the hilighting color. If I use the InvertRect command without
> doing anything, then it is possible to toggle between regular
> black on white text and inverted white on black text with
> a single call to InvertRect. 
> 
> If I clear the top bit of the right part of the toolbox memory,
> then I get a perfect result the first time I call InvertRect.
> The text goes from black on white to black on hilight color. But
> on the second call when I try to revert the text to normal, it turns
> black. 
> 
> What's the trick? Why isn't it toggling?
> 
> Any help would be much apprciated. Thanks....
> 
> Peter Wayner
> (pcw@access.digex.com)

If you're using the HiliteMode low memory global, you need to turn it
on before each and every invert call you make; it will turn itself off.
In essence, it's just a flag to say "Make the next invert call hilite".
If you want a more permanent solution (also good because it doesn't use
low memory globals), just use the hilite transfer mode; it will do
the hiliting for you and it won't turn off.

Tim Dierks
MacDTS, but I speak for myself
Newsgroups: comp.sys.mac.programmer
From: noah@apple.com (Noah Price)
Subject: Re: Macintosh Doggles...
Date: Wed, 27 Jan 1993 21:24:57 GMT
Organization: (not the opinions of) Apple Computer, Inc.
Followup-To: comp.sys.mac.programmer

In article <C1F0wG.FF6@world.std.com>, howlett@world.std.com (Joseph S
Howlett) wrote:
> I managed to completely break one dongle's protection scheme in a fairly
> general way in just a couple of afternoons of playing with some trap patches.
> I did this to prove to the company I work for that we should discontinue our
> reliance on a dongle protection scheme for our software products.

Newer ones actually put intelligence out in the dongle.  Nothing's
foolproof, but if some algorithm your program depends on is actually
implemented in the dongle, or if some data is decrypted by passing it
through the dongle, things are much more secure.

noah

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
noah@apple.com                                 Macintosh Hardware Design
...!{sun,decwrl}!apple!noah   (not the opinions of) Apple Computer, Inc.
From: changw@nmt.edu (willie* chang)
Newsgroups: comp.sys.mac.programmer
Subject: Think C or MPW C ?
Date: 24 Jan 93 18:40:02 GMT
Organization: New Mexico Tech

Hello netters:

I'd like to develop a MIDI (music-instrumental digital interface)
software (shareware or freeware at the start), and I wonder if I
should use Think C which I have or some other C compiler such as
MPW C, or some C++ on Mac.

Do you have any good/bad experiences using Think C, MPW C, or others?
Thanks,

willie*
Newsgroups: comp.sys.mac.programmer
From: bskendig@netcom.com (Brian Kendig)
Subject: Re: Xlisp on the Mac
Keywords: where? macstuff.h Xlisp Mac executables
Organization: Starfleet Headquarters: San Francisco
Date: Thu, 21 Jan 1993 22:38:07 GMT

eblackle@cbnewse.cb.att.com (eric.l.blackledge) writes:
>I have downloaded all of the source for Xlisp 2.1 to my Mac.  Missing,
>however, is the macstuff.h file and other files that are needed to compile
>on my Mac.
>
>Does anyone know where this (these) files might be located?  I have looked
>on sumex and umich in their language directories and they don't have any 
>xlisp stuff.  

Easy!  You write 'em yourself.  :-)  Or else you wait for my xlisp port
to be released Real Soon Now; all I think I have left to do in it is to
write some file management code, and that'll be all.

-- 
_/_/_/  Brian Kendig                             Je ne suis fait comme aucun
/_/_/  bskendig@netcom.com                de ceux que j'ai vus; j'ose croire
_/_/                            n'etre fait comme aucun de ceux qui existent.
  /  Nolite te bastardes     Si je ne vaux pas mieux, au moins je suis autre.
 /    carborundorum.                                             -- Rousseau
Newsgroups: comp.sys.mac.programmer