HDTenEightyP/NetNews huggingface dataset:
From: d88-jwa@byse.nada.kth.se (Jon Wtte)
Subject: Re: problem with my dialog filter
Originator: d88-jwa@byse.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
	<1992Oct8.164657.26841@nrtpa038.bnr.ca>
Date: Thu, 8 Oct 1992 19:54:14 GMT

> Ted Lowery <tbl@rock.concert.net> writes:

	   InsetRect (&itemRect, 1, 1);
	   InvertRoundRect (&itemRect, 8, 8);

And if the button isn't round? You could just as easily
get the item handle, and HiliteControl(1) it instead, and
it will work on all buttons.

	   ticksLater = TickCount() + 10;

Use GetDblTime instead of "10" - or half GetDblTime.
That way you cater to both "slow" and "fast" users.

	   while (TickCount() < ticksLater) ;

You should use _Delay, which is a system call that does just
this, but also calls SystemTask. It might also do other
things in the future. Doing only this is really bad, since
there may be drivers that need time often.

		   case 0x0D:
		   case 0x03:
			   *itemHit = OKButton;
			   FlashButton(OKButton);
		   default:
			   break;

You should handle escape as well, as cancel. Cmd-period is
also a good cancel button. While you're at it, check the key
codes as well, as they probably change even less than the
character codes on international keyboards. Oh, and when I
do this, and get no match, I loop through all enabled buttom
items in the dialog/alert and see if the key pressed matches
the first letter in the button. That makes Alerts and modal
dialogs much easier on touch typists.

Actually, that should be the law :-)

-- 
Jon W{tte, h+@nada.kth.se, Sweden, Phone +46-8-107069

"From now on, I think I'll re-label the EQ on the
 desk as Fizz and Wobble, rather than HF and LF."
Newsgroups: comp.sys.mac.programmer
From: jcav@quads.uchicago.edu (JohnC)
Subject: Re: Q: Deep dark MDEF menu manager debugging...
Reply-To: jcav@midway.uchicago.edu
Organization: The Royal Society for Putting Things on Top of Other Things
Date: Wed, 7 Oct 1992 15:09:48 GMT

In article <1992Oct7.093654.25398@bernina.ethz.ch> Andreas Wuertz <wuertz@tik.ethz.ch> writes:
>I had problems with DrawString in an LDEF. DrawString seems to use some
>type of global variable, which you're not allowed to in xDEFs. Try
>replacing with DrawChar.

What???   This can't be right.  The standard plain-vanilla system LDEF=0
uses _DrawText to draw list cells.  Since _DrawString is just a wrapper for
_DrawText, I think the problem lies elsewhere.  _DrawText _is_ a Quickdraw
routine, so it most likely requires that the A5 register be set up for
access to a valid set of Quickdraw globals, but I can't think of a
situtation where that wouldn't be true when an xDEF is called by the system.


-- 
John Cavallino                  |  EMail: jcav@midway.uchicago.edu
University of Chicago Hospitals |         John_Cavallino@uchfm.bsd.uchicago.edu
Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
B0 f++ c+ g++ k s++ e+ h- pv    |         Chicago, IL  60637
Newsgroups: comp.sys.mac.programmer
Subject: Re: buss error on ModalDialog
From: winer@husc10.harvard.edu (Adam Winer)
Date: 9 Oct 92 20:24:57 GMT

Call SelectWindow(theDialogPtr);

This took me a while to figure out when I was just beginning.  IM I doesn't
explain this very well (though it does imply it, if you read closely).

Good luck,
Adam
-- 
Adam Winer		| The number you have reached is imaginary.
WINER@HARVARD.EDU	| Please rotate your phone 90 degrees and
                        | try again.
Newsgroups: comp.sys.mac.programmer
From: resnick@cogsci.uiuc.edu (Pete Resnick)
Subject: Re: Deferred Tasks - What can I do?
Organization: University of Illinois at Urbana
Date: Fri, 9 Oct 1992 16:25:11 GMT

Jeff E Mandel <mandel@tmc.tulane.edu> writes:

>Since I probably planted the idea in Pete's head about Deferred Tasks,

You did. :-)

>the best thing I can suggest is to decide whether the blocks you need at
>interrupt time can be of a fixed size, or not.

They are fixed size in my case, and I will probably implement this
using an private queue. The problem was that I didn't want to
pre-allocate all of this memory since many of the blocks may never be
used, but it shouldn't be too big a deal.

Thanks to everyone for the input.

pr
-- 
Pete Resnick             (...so what is a mojo, and why would one be rising?)
Graduate assistant - Philosophy Department, Gregory Hall, UIUC
System manager - Cognitive Science Group, Beckman Institute, UIUC
Internet: resnick@cogsci.uiuc.edu
Newsgroups: comp.sys.mac.programmer
From: u8123033@cc.nctu.edu.tw ()
Subject: Re: PICT images should remain on the screens ? How can I do it ?
Organization: National Chiao Tung University
X-Newsreader: TIN [version 1.1 PL6]
Date: Mon, 12 Oct 1992 05:10:23 GMT

Hello friend,
    Just read your message. Well, CopyBits may be one of the answers
to your problem, and it's the only one I think of till now. :) Draw
your PICT into an off-screen-pixelmap, then put it on the screen
from the off-screen-pixelmap using CopyBits.
    In the past days, use of off-screen-pixelmaps is a nightmare with
pages of code and dozens of bugs. How 32-bit QuickDraw provides full
support to offscreen-pixmaps(now called Graphics World or GWorld), so 
that we don't have to do everything ourselves. You may find some more
information about it yourself. :)

      Paladin Mu
From: potts@itl.itd.umich.edu (Paul Potts)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think C and sizeof() ???
Date: 13 Oct 1992 20:13:53 GMT
Organization: Instructional Technology Laboratory, University of Michigan
NNTP-Posting-Host: 141.211.162.10

In article <keith-131092094406@kip-55.taligent.com> keith@taligent.com (Keith Rollin) writes:

<solution for working around the ever-brainless printf() routine left out>...

I'm sure Keith is familiar with this, but for anyone who isn't...
this is one of the things that is much, much nicer under C++. (Although
C++ is far from perfect)... C++ i/o routines "know" about their types,
or, rather, the compiler knows about the types that you are sending to
them, and calls the proper routines accordingly. It is truly wonderful
not to have to worry about things like this (although there are plenty
of other things to worry about...)


-- 
"Everything I say is a lie." <--- potts@oit.itd.umich.edu ---> that's me!
"C++ will make your programming simpler, more efficient, and more fun!"
"What good is a computerized nose?" - Lou Reed
Newsgroups: comp.sys.mac.programmer
From: absurd@applelink.apple.com (Tim Dierks, software saboteur)
Subject: Re: Gestalt, Think C and System 6
Date: Thu, 15 Oct 1992 03:12:11 GMT
Organization: MacDTS Marauders
Followup-To: comp.sys.mac.programmer

In article <1bii82INNrnm@sol.deakin.OZ.AU>, webb@cm.deakin.OZ.AU (Geoff
Webb) wrote:
> 
> Using Think C 5.0.3, with the declaration
> 
>         long gestalt_response;
> 
> the calls
>         Gestalt(gestaltFindFolderAttr, &gestalt_response);
>         Gestalt(gestaltNotificationMgrAttr, &gestalt_response);
>         Gestalt(gestaltHelpMgrAttr, &gestalt_response);
> 
> all fail to alter the value of gestalt_response when run on System 6.
> 
> I can get the desired results by initializing gestalt_response to 0 before
> each call, but this does not seem right.
> 
> Is this a bug?
> 
> Am I missing something?
> 
> Thanks in advance for any help.
> 
> Geoff.

I'm sure I won't be the only one saying this:

You really need to start checking errors.

Because none of these functions (or Gestalt selectors) are available
under System 6, Gestalt is returning you an error,
gestaltUndefSelector (-5551), if only you were listening to it.  The
fact that you get this error indicates that the Mac doesn't know what
you're asking about, so you can assume (in this case) that it doesn't
have the functionality you're checking after.

Enjoy,
Tim Dierks
MacDTS, but I squeak with my Zs.
Newsgroups: comp.sys.mac.programmer
From: Reid Ellis <rae@Alias.com>
Subject: Re: MPW Question
Organization: Alias Research, Inc., Toronto ON Canada
Date: Thu, 15 Oct 1992 13:58:31 GMT

Keith Rollin <keith@taligent.com> writes:
|I got one, too. Looks like this:
|
|AddMenu Special "Unmangle Name/U" 'set temp "`catenate
|"{Active}.<opt-6>"`";  Alert -s "`UnmangleTool "{temp}"`"'
|
|That's all one command line; any line breaks are provided by your friendly
|neighborhood newsreader.

<Bruce.Hoult@bbs.actrix.gen.nz> writes:
|Why use two statements when one will do?  :-)
|
|AddMenu Special "Unmangle Name/U" \d
| 'Alert -s `UnmangleTool \d`Catenate "{active}.\6"\d``'
|
|[  \d means <option>-d,  \6 means <option>-6  ]

My preference is for in-place unmangling.  A bit more verbose, but I
like it [\x is options-x, \. is option-. etc etc]

    AddMenu Misc 'Unmangle/U' \d
        'Begin; \d
            target "{active}"; \d
            set str `cat "\6"`; \d
            set unstr "`unmangle {str}`"; \d
            if "{unstr}" =~ /Unmangled symbol: (\x)\r1/; \d
                set unstr "{\r1}"; \d
            end; \d
            replace "\6" "{unstr}"; \d
            rotateWindows; \d
        End > Dev:Null \. Dev:Null'

The only thing about this is that it *requires* that at least 2
windows be open.  Ergle.

Reid
--
Reid Ellis                                            
rae@utcs.utoronto.ca        ||           rae@Alias.com
CDA0610@applelink.apple.com ||  +1 416 362 9181 [work]
From: howard@netcom.com (Howard Berkey)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think C bug ? (updated)
Date: 12 Oct 92 23:19:50 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest)

In article <31447@sophia.inria.fr> jmale@cosinus.inria.fr writes:

>H.Berkey|>       Sounds like you forgot to #include <stdio.h>.  When the compiler read the
>H.Berkey|>       first printf, it inferred the prototype as having 2 args.
>
>		 That doesn't seem to be the good reason. I've tried
>		 both (with and without `#include <stdio.h>' and both
>		 worked on a Sun with native C compiler.
>		 Very strange.

It has to do with the THINK environment as well.  If the 'infer prototypes' 
box in the preferences is checked, THINK C will look at the first occurrence 
of a function to determine what it's args. should be.  The Sun cc doesn't
work the same way.

-Howard



-- 
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Howard Berkey						howard@netcom.com
Do what keeps thou from wilting shall be the loophole in the law.
Newsgroups: comp.sys.mac.programmer
From: jlawrie@fraser.sfu.ca (John William Lawrie)
Subject: oop question
Summary: need help designing data structure in think c OOP
Keywords: OOP oop think
Organization: Simon Fraser University, Burnaby, B.C., Canada
Date: Thu, 15 Oct 1992 01:39:47 GMT
From: MacUserLabs@cup.portal.com (Stephan - Somogyi)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Telling the Finder to update a file's type & creator
Date: Mon, 12 Oct 92 09:01:56 PDT
Organization: The Portal System (TM)
Distribution: world

mkelly@mystix.cs.uoregon.edu (Michael A. Kelly) writes:

>I'm writing yet another program to change a file's type and creator. I
>would like to tell the Finder to immediately update the file's icon and/or
>Kind when I change the type and/or creator.

Touch the parent directory's mod date. The Finder will update very shortly
thereafter.

__________________________________________________________________________
Stephan Somogyi                critical pathologist                MacUser
Newsgroups: comp.sys.mac.programmer
From: oas@cray.com (Omar Souka)
Subject: Apple Event Object Model Source Code Examples
Followup-To: comp.sys.mac.programmer
Organization: Cray Research
Date: 8 Oct 92 10:22:50 CDT

Does anyone know of good code examples that send object model
Apple Events?  Specifically, I want to sent Apple Events to
Excel 4.0.

Thanks.

########################
# Omar Souka           #
# Cray Research, Inc.  #
# oas@cray.com         #
########################
From: kjh+@cs.cmu.edu (Kenneth Hughes)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Forcing Sys6 on a Q700?
Date: 15 Oct 92 20:10:25 GMT
Article-I.D.: cs.Bw6Ipp.CK8.1
Followup-To: comp.sys.mac.programmer
Organization: School of Computer Science, Carnegie Mellon

Here's a summary of the responses I received on this topic:

Since 7.0.1 has ROM bug fixes for the Quadras (that of course are missing
in System 6 since the Quadra's came out after the last version of System 6
had been released), it would not really be feasible to attempt to hack
something to make System 6 run on the Quadras.

Mats.Bredell@udac.uu.se wrote:
> There's a version of system 6 that works on the PowerBooks. I think this also
> works on the Quadras. The version is called 6.0.8L.

According the the 10-5-92 article in MacWEEK:
"The new-found system is labeld 6.0.8L.  It supports a limiteed set of Macs:
the PowerBook 100, the LC, LC II, Classic and Classic II.  Other models, such
as the Mac II, IIcx and IIci, are not supported at all."
	I didn't see anywhere else any mention of Quadra support.  If it's in
there (which I doubt) I'd love to hear about it.
	They do later refer to an "acute " desire for System 6, however.  
This in fact had prompted my other question regarding what fraction of users
still use System 6.  I didn't get any numbers on this, but one respondent
pointed out that he thought the System 6 hold-outs were probably much less
likely to be buying software.  I'd love to get some real numbers on this if
any developer has any info to share.
	Thanks especially to Jon W{tte and Larry Rosenstein for their comments.

Kenneth J. Hughes     (kjh@cs.cmu.edu)
Entelechy Corporation
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: Forcing Sys6 on a Q700?
Organization: Kalamazoo College
Date: Thu, 15 Oct 1992 21:24:31 GMT

kjh+@cs.cmu.edu (Kenneth Hughes) writes:
>
>...one respondent
>pointed out that he thought the System 6 hold-outs were probably much less
>likely to be buying software.  I'd love to get some real numbers on this if
>any developer has any info to share.

No numbers, but the other day I did see a bumper sticker that read
"I'm pro-System-6...and I purchase!"
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 I suppose ya don't think I was run over by a streetcar!
From: marshall@sdd.hp.com (Marshall Clow)
Newsgroups: comp.sys.mac.programmer
Subject: Re: MPW Question
Followup-To: comp.sys.mac.programmer
Date: 8 Oct 1992 20:24:21 GMT
Organization: Hewlett Packard San Diego Printer Division
Distribution: world
NNTP-Posting-Host: hpsdr160.sdd.hp.com

In article <1992Oct8.183543.19690@mcs.drexel.edu>, udasbell@mcs.drexel.edu
(David M. Asbell) wrote:
> 
> While trying to compile a program using Appletalk, I get this...
> 
> [ stuff deleted ]
>     CPlus DDP.cp
>      Set Echo 0
>     Link -t APPL -c '????' DDP.cp.o "Blue 
> [ more libraries deleted ]
> ### Link: Error: Undefined entry, name: (Error 28) "Socket__7Network"
>   Referenced from: __dt__3NBPFv in file: DDP.cp.o
> [ more stuff deleted ]
> What is the cause of the Error 28  "Socket__7Network"
>   Referenced from: __dt__3NBPFv in file: DDP.cp.o    
> 
> I have no idea what "Socket__7Network" is, it generates this on its own..
> I guess its part of appletalk???
> Anyway, what am I doing wrong, or not doing???
> Thanks.

I don't have a solution for you, just a pointer: MPW C++ comes with a tool
to unmangle C++ routine names. I ran it and:

UnmangleTool Socket__7Network __dt__3NBPFv
Unmangled symbol: Network::Socket
Unmangled symbol: NBP::~NBP()

So, your error message could be rewitten to say:

> ### Link: Error: Undefined entry, name: (Error 28) "Network::Socket"
>   Referenced from: "NBP::~NBP()" in file: DDP.cp.o

Marshall Clow
San Diego Printer Division      Hewlett Packard
Internet: marshall@sdd.hp.com   AppleLink: HP.Marshall    AOL: MClow

yamma
yamma
yamma
Newsgroups: comp.sys.mac.programmer
From: ksand@apple.com (Kent Sandvik)
Subject: Re: Think C++??
Date: Wed, 14 Oct 1992 04:47:22 GMT
Organization: Apple
Followup-To: comp.sys.mac.programmer

In article <1992Oct13.124312.887@gagme.chi.il.us>, essam@gagme.chi.il.us
(Essam Khairullah) wrote:
> I have never quite figure out why people would want to use MPW anything to
> do any programming!  It just seems to be so archaic!  Maybe if they put a
> Commando shell on it (ala A/UX) it would be easier to use...  But then just
> remember that this (MPW) is coming from the same people who invented the idea
> of using a Lisa to program a Mac...

You are maybe then also amazed that the system you are using is produced
using
MPW. No wonder Apple engineers get high salaries :-).

BTW, most MPW tools have commando interfaces, A/UX took the idea/src
from MPW...

Kent
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.
Newsgroups: comp.sys.mac.programmer
From: joel@balboa.mrg.uswest.com (Joel Sandpiper Noble)
Subject: Need a MacTCPspoofing INIT...
XXXDate: Thu, 8 Oct 92 22:14:07 GMT
XUserAgent: Nuntius v1.1.1d12
XXXMessageID: <A6FA00BF8A01071C@joel_noble.mrg.uswest.com>
Organization: U S West Marketing Resources
NntpPostingHost: joel_noble.mrg.uswest.com
Date: 08 Oct 92 21:17:39 GMT



I would like to know if it's possible to "intercept" calls to open a
telnet session via MacTCP, take the IP# and port# that were going to be
sent to MacTCP and instead open a session with another host (which is
invariant, perhaps set in a control panel?) and pass the IP# and port# to
the new session instead.

This is needed to get around a security gateway.  Basically, anything
that goes through this gateway (usually reached through a normal
commandline interface) gets out, but it's the only way out into the net
for telnetting.  All the new cool mac clients for Gopher, Wais, etc
aren't built to be configurable enough to handle this strange situation. 
I've talked with those in charge, but noone seems to want to change the
way security is done since noone is convinced that it would be secure in
other ways.

Therefore, I'm looking for someone to either write (perhaps with
remuneration if you like) some INIT or CDEV or heck, even HyperCard hack
to do this if possible, or to give some advice on how/if it can be done.

Thanks for your time!

jsn the sandpiper
From: tonyg@cs.uq.oz.au (Tony Gedge)
Newsgroups: comp.sys.mac.programmer
Subject: Sharing THINK C objects between XCMDs?
Keywords: thinkc objects xcmds hypercard
Date: 8 Oct 92 00:02:02 GMT
Reply-To: tonyg@cs.uq.oz.au

Is it possible to share THINK C 5.0 objects between XCMDs?  That is, I'd like
to allocate an object in one XCMD and return an string representing it's
handle or ptr address, and then pass the string to another XCMD which recovers
the object and uses it.

For example, something like:
on openDictionary theDict
	put NewDatabase() into objID
	SetDBName(objID, theDict)
	if the result contains "Error:" then return the result
	OpenDB(objID)
	if the result contains "Error:" then return the result
	return objID
end openDictionary

I've tried this before, but it seems that something about the way objects are
compiled makes this fail.  It would appear that the object ID's in the XCMDs
are different (not altogether surprising) and that these object ID's are used
to find which resource/dispatch table/etc. to load.  The upshot is that it
doesn't work :(

Can this be done under MPW C?  Is there a method which can acheive this effect
under THINK C?

Tony Gedge.

--
| Computer Science Department,       |  tonyg@cs.uq.oz.au   (Tony Gedge)  |
| University of Queensland,          |  --------------------------------  |
| Australia.                         |  "cc stands for Cryptic Crossword" |
| FAX: +61 7 365 1999.               |  PH : +61 7 365 2445               |
From: niel@cars.com (Niel Bornstein)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Corporate developer's association?
Date: Tue, 13 Oct 92 09:10:48 EDT
Organization: Heavy Objects R Us
Reply-To: niel@chinchilla.cars.com
X-Mailer: uAccess - Macintosh Release: 1.6v1


In article <chuck-081092093152@choffman.gte.com> (comp.sys.mac.programmer,comp.sys.mac.misc,comp.sys.mac.hypercard), chuck@gte.com (Chuck Hoffman) writes:
>I develop both in-house and outside.  If you got a conference organizing
>company to put something on, I would attend.  Especially in Atlanta. 
>Especially at World Series time.

Funny, used to be that Atlanta was the LAST place anyone wanted to
be around World Series time.

Niel

|--------------------------------------------------------------------------------
| Niel M. Bornstein                                    niel@chinchilla.cars.com |
| 1352 North Morningside Drive                     ...csn!sable!chinchilla!niel |
| Atlanta, Georgia  30306                       (404) 872-6883   (404) 551-8075 |
--------------------------------------------------------------------------------|
| Opinions? I don't need no stinkin' opinions!                                  |
|--------------------------------------------------------------------------------
From: peirce@outpost.SF-Bay.org (Michael Peirce)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Productivity of a C programmer ?
Date: 16 Oct 92 04:43:51 GMT
Reply-To: peirce@outpost.SF-Bay.org (Michael Peirce)
Organization: Peirce Software
X-Mailer: uAccess - Macintosh Release: 1.6v1


In article <1bk5q1INNinj@uwm.edu> (comp.lang.c,comp.software-eng,comp.sys.mac.programmer), markh@csd4.csd.uwm.edu (Mark) writes:
> In article <mxmora-121092100513@css-mac1.sri.com> mxmora@unix.sri.com (Matthew Xavier Mora) writes:
> >In article <BvvIK4.EuJ@news.cso.uiuc.edu>, rolf@geoserv (Rolf Wilson)
> >wrote:
> >>   And then double it. Most programmers are pretty good at estimating
> >> their programming time, but don't seem to realize that they may only
> >> get half of their day to program in.
> >
> >They also forget to include the time for testing and debugging. :-)
> 
> >From experience, debugging is about 5% of the total time, because of the
> process undergone in prior stages (incremental development strategy, correct
> programming, and formal verification)
> 
> Testing is nil, since that's part of coding (in an incremental development
> strategy).

Ahem, for commercial quality code (some that is to be sold and supported)
you can expect to spend more time testing than doing initial development.

I've seen many companies skimp on testing effort and they have almost
always paid for it big time in bugs in the shipping product.

If you are planning on commercial quality code, spend as much time
testing it as you do developing it.  You'll do your users a BIG favor.

Of course, if this is for in-house use only (or educational use) this
can be trimmed some.

--  Michael Peirce      --   peirce@outpost.SF-Bay.org
--  Peirce Software     --   Suite 301, 719 Hibiscus Place
--                      --   San Jose, California USA 95117
--  Makers of...        --   voice: (408) 244-6554 fax: (408) 244-6882
--            SMOOTHIE  --   AppleLink: peirce & America Online: AFC Peirce