HDTenEightyP/NetNews huggingface dataset:
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Things That May Become Dim
Date: 24 Jul 92 18:32:50 +1200
Organization: University of Waikato, Hamilton, New Zealand

In article <1992Jul22.171644.7212@midway.uchicago.edu>, jcav@quads.uchicago.edu (JohnC) writes:
> In article <1992Jul22.111616.3574@reed.edu> orpheus@reed.edu (P. Hawthorne) writes:
>>If a non-movable modal dialog is up, should all of the menu titles on the
>>menu bar be dimmed, since you can't use them? What if one of the menus is
>>hilited to begin with, such as the Apple menu after bringing up an about
>>window that goes away as soon as you click?
>
> The guidelines say that menus and menu items that aren't available should be
> dimmed.  Before System 7, you couldn't click anywhere outside a modal dialog
> box, so it made sense to disable the entire menu bar.  Since System 7, Apple
> recommends that the Apple, Edit and other system menus remain available during
> modal dialogs.  I think the system handles this auto-magically for most cases.

I think the automagic only works if you use ModalDialog. I know I wrote some
code using IsDialogEvent/DialogSelect (because it was more convenient), and
I wasn't getting the special handling of the Edit menu; I changed the code
to call ModalDialog, and recoded my special item handling as a filter routine,
and cut/copy/paste then worked in my dialog.

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
From: de19@umail.umd.edu (Dana S Emery)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Password entry in a dialog
Date: 24 Jul 92 08:13:28 GMT
Followup-To: comp.sys.mac.programmer
Organization: Personal

In article <28473@goofy.Apple.COM>, dwb@apple.com (David W. Berry) wrote:

> Simplest approach I've seen is to create a FONT with nothing but bullet's
> in it and use it for the font for the TERec.  Saves all kind's of hassles
> and kludges and works almost anywhere.

Unfortunatly, spaces are not printed from the FONT/NFNT, so they will not
echo as a bullet. I discovered this the hard way while developing a 'show
invisibles' capability, and decided to use sicns for the invisibles in
stead of a private font.  Since some passwords allow space as a character,
this is not a foolproof technique.

--

Dana S Emery <de19@umail.umd.edu>
Newsgroups: comp.sys.mac.programmer
From: rtbunker@phoenix.Princeton.EDU (Ross T. Bunker)
Subject: printf() problem in thinkC
Originator: news@ernie.Princeton.EDU
Organization: Princeton University
Date: Thu, 23 Jul 1992 23:11:37 GMT

Hello,
	I'm having problems with printf() in ThinkC 5.02.  In attempting to
print a string > 32K, printf("%s", str) prints a lot of blanks, then the
string followed by garbage.  It does not end.  This is not a problem with
lack of a NULL terminater.  Both puts, and fwrite work fine.  the printf
family of functions however fails.  Has anyone else noticed this? (like many
people print out > 32 K strings! :-)  Is there a fix?
	I have tested this VERY thoroughly and I'm as sure as I can be that it
is NOT something i'm doing incorrectly (Though everytime I say that it
inevitably is.)  It is possible that there is some subtlety that i am not
aware of in terms size of ints and things, but I have gone in to macsbug and
watched it pass arguments and it seems fine.
	If you haven't heard of this and want to see it for yourself I can mail
you a short (10) line program that illustrates it.

	Thanks very much for any help.

-- 
------------------------------------------------------------------------------
:)ross                            | I don't have to take this abuse from you -- 
Internet - rtbunker@princeton.edu | I've got hundreds of people waiting to abuse
Bitnet   - rtbunker@pucc.bitnet   | me.  --Bill Murray, "Ghostbusters"
Newsgroups: comp.sys.mac.programmer
From: thor@vivaldi.psu.edu (Thomas Moertel)
Subject: Re: To ETO or not to ETO?
Organization: Pennylvania State University
Distribution: comp
Date: 30 Jul 92 20:08:26

> Anyway, I feel its a bargian, and if I were to strike out and form my
> own business, I would definately list a CR-ROM machine and ETO as
> must-haves.
 
Could sombody please tell me how much ETO costs?  I already have MPW
with Asm, C, C++, and SADE, so I'll guess about $700, but I'd love to
have the real numbers.  Thanks!
 
--Tom
--

Tom Moertel                 Pennsylvania State University
thor@vivaldi.psu.edu        "Them bats is smart. They use radar!"  ;-)
Newsgroups: comp.sys.mac.programmer
From: ross@bnr.ca (Ross Brown)
Subject: Re: Q: Checking for modif keys on app startup
Organization: Bell-Northern Research
Date: Wed, 29 Jul 92 14:43:20 GMT

In article <Bs55zL.1GD@taligent.com> keith@taligent.com (Keith Rollin) writes:
>>[previous post deleted]
>I don't really know if either method is better than the other. The only thing
I
>can think of is that some people (myself included) have a hard time trying to
>figure out how to read the KeyMap variable (I program in C, which defines
KeyMap
>as 4 longs, and not a packed array of 128 Booleans).

How often do I get the chance to help Keith Rollin out?  :-)

Boolean	IsKeyDown( short keyCode )
{
	char	keyMap[ 16 ];
	
	GetKeys( (KeyMap) keyMap );
	
	if( keyMap[ keyCode >> 3 ] & ( 1 << ( keyCode & 0x7 ) ) )
		return true;
	else
		return false;

}

W. Ross Brown                 | from Brown's Dictionary of Psychic Kinematics:
Advisor, Telemanagement Svcs. |                          ex-hil'a-ra'tion (n.)
Bell-Northern Research Ltd.   |                The rate of change of felicity.
Ottawa, Ontario, Canada       | ----------------------------------------------
ross@bnr.ca                   |      Any opinion expressed is mine, not BNR's.
From: scott@mcl.ucsb.edu (Scott Bronson)
Newsgroups: comp.sys.mac.programmer
Subject: Re: SetHandleSize and SetPtrSize
Date: 21 Jul 92 22:37:19 GMT

In <1992Jul18.160240.15039@welchgate.welch.jhu.edu> francois@welchgate.welch.jhu.edu (Francois Schiettecatte) writes:

>I'm sorry if this is a FAQ or well known but here goes:

>If I reduce the size of a handle/pointer using SetHandleSize or
>SetPtrSize, do the contents of the handle/pointer get preserved
>up to the size of my new handle/pointer. For example if I have a
>handle  of 30000 bytes and I am only using 20000 bytes, if I 
>set its size to 20000 bytes, will the contents be preserved?


If this isn't a FAQ, it should be.  I've seen three questions about
SetHandleSize in the past week or so.

Both calls retain as much data as is possible.  So, when increasing the size,
all bytes up to the old size will be what was there before, and all the bytes
added will be undefined.  When decreasing size, all bytes trunctated will be
undefined, but all bytes still inside the block will be untouched.

	- Scott
From: ebrown@bud_light.kodak.com (Eric Brown)
Newsgroups: comp.sys.mac.programmer
Subject: Sample (disk) driver code?
Date: 27 Jul 92 17:56:02 GMT
Article-I.D.: bud_ligh.EBROWN.92Jul27135602
Reply-To: ebrown@tap.kodak.com
Organization: Eastman Kodak Company


I am curious how much work it is to write a disk driver.

So, I was wondering if there was any sample Mac block device
drivers floating around. For example, an example ram-disk driver
or something? I'm preferably looking for source THINK C code,
but I'll take anything I can get.

Please reply via e-mail: ebrown@tap.kodak.com or
ebrown@bud_light.kodak.com

Thanks in advance,
Eric Brown.
--
From: bscott@sbphy.physics.ucsb.edu ( Brian Scott)
Newsgroups: comp.sys.mac.programmer
Subject: Acessing the TRAP word
Keywords: trap
Date: 31 Jul 92 04:43:20 GMT


Hi,

When you overload a trap, how can you access the trap word
in the routine that handles the trap.  I am overloading the 
PBRead routine.  I need to check whether the ASYNC bit of
the trap word has been set in my routine that handles PBRead.
Is this possible?

Any help is appreciated,

Thanks,

Brian
From: cent@u.washington.edu (bob cent)
Newsgroups: comp.sys.mac.programmer
Subject: ResEdit resource problem
Date: 29 Jul 92 15:49:51 GMT
Organization: university of washington

Greetings, 

When I call an Alert box to appear, using either the toolbox function StopAlert
or the MacApp call MacAppAlert, I get the expected alert box but the static
text is surrounded by a heavy black line with rounded corners.  Also, if I
click in the text area, the alert box will go away as though it were the OK
button.   I have included my own OK button which also dismisses the alert box. 
Does anyone understand what I have done wrong?

I created this resource using ResEdit 2.1.1.  In doing so, I made an ALRT and
DITL resource which I have given the id number of 3333 to both.  This resource
file is combined with other resource files using SARez and SAPostRez and used
with a Think Pascal-created application which uses MacApp.

I have only limited knowledge of ResEdit and would appreciate all
advice/warnings for its use and recommendations for learning materials.

Thanks!


Bob Cent
cent@u.washington.edu
Seattle, Washington
Newsgroups: comp.sys.mac.programmer
From: jms20@po.CWRU.Edu (John M. Sully)
Subject: Blessing (?) a system folder
Reply-To: jms20@po.CWRU.Edu (John M. Sully)
Organization: Case Western Reserve University, Cleveland, OH (USA)
Date: Tue, 21 Jul 92 19:01:10 GMT


Greetings,
   I've written a little app that copies a fresh copy of a system folder
off of a file server onto a local HD, but have hit a little snag.  How
does one bless a system folder (make the little system folder icon appear,
make it boot, etc).

Thanks a heap...
John
-- 
| John M. Sully                    |                                       |
| Computer Science                 |      Natural Blonde --                |
| Case Western Reserve University  |        Please Speak Slowly...         |
| jms20@po.cwru.edu                |                                       |
From: scott@mcl.ucsb.edu (Scott Bronson)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Literals as Opposed to Constants for Menu Handling
Date: 25 Jul 92 00:18:34 GMT

In <1992Jul18.104355.12995@reed.edu> orpheus@reed.edu (P. Hawthorne) writes:

>Your code wants your menus to be in one language, and your users want your
>menus to be in their language. So why not just have two menus? An easy
>replacement for the MBAR resource can let you specify one menu for literals
>and another for show. There's not much to reading them in, installing only
>the local menus in the menu bar. When you get a command, get the equivalent
>item from the literal menu, and deal with it. The special case for the
>literal language being the same as the local language is easy.

>So, what's the fatal flaw in this scheme?

No fatal flaw that I can see, but personally I think that I would
find a more straightforward way.  I would use the Menu Manger like
it was written for (one menu bar) with only minor additions for
internationalization and your own use.

My suggestion would be to implement a scheme like the THINK Class
library uses for menus.  Follow each menu item with # sign (or
whatever you want it to be) then a command number.  This actually
turns out to be surprisingly easy to implement.

Right now I have some code that hasn't been stress tested yet, but it
does work.  It translates command numbers into a run-time command
look-up table, then automatically processes MenuSelect.  You simply
set up a switch statement to handle the command numbers you specify.
One of these days I'm going to have this code self-send an apple
event so that to add a menu command, you simply add the menu item
then the handler for the apple event.

The beauty of this system is that you can have your menus ANYWHERE
in the menu bar and they will be automatically processed.  If you
really can't figure this out for yourself I'm happy to give hints,
but my code isn't ready to be released yet for public consumption.

Just a thought.  I think this scheme might suit your needs better.

	- Scott
Newsgroups: comp.sys.mac.programmer
From: ericsc@microsoft.com (Eric Schlegel)
Subject: Re: Radio buttons
Date: 29 Jul 92 19:58:07 GMT
Organization: Microsoft Corporation

In article <1992Jul26.195145.1@acad3.alaska.edu> fsmah1@acad3.alaska.edu (Mike Hageland) writes:
>I have a very simple little problem with what seems to be a complicated
>solution.  Look at this diagram and pretend the X represents where I
>want a radio button.
>
>  X  Title | Title X
>  X  Title | Title X
>  X  Title | Title X
>
>Personally I think this looks kinda neat.  I would like to do something
>like this.  Now this is no problem, I can simply draw the titles in and 
>then place in the radio buttons.  However, then you can't simply click 
>onto the title like you can with most radio buttons.  It seems that the
>radio button will only put the title to the right of the radio button.  
>
>Is there a hidden way to make a radio button have a title on the left?

You need to set the system justification to teFlushRight (-1) before
drawing the right-hand column of radio buttons. You can do this with the
Script Manager trap _SetSysJust:
	SetSysJust(teFlushRight);
Don't forget to save the previous justification using _GetSysJust before
changing it, and restore it afterwards.

If you're doing this in a window of your own creation, you can just 
call _SetSysJust and then _Draw1Control to draw the right-hand radio buttons.
If your radio buttons are in a Dialog Manager dialog you may need to use
a filter proc that catches update events and does the updating itself,
using _SetSysJust and _Draw1Control as needed, instead of letting the Dialog
Manager draw the controls.

For more information, see Inside Mac vol. 5, pg. 301, "Writing Direction."

-eric
-------
My opinions, not Microsoft's.
From: apple.com (Ben Beasley)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How does one get Chooser name?
Date: 23 Jul 92 14:44:18 GMT
Organization: Apple

Apple Tech Note 311, around page 16 show the system 7.0 specific machine name
to be 'STR ' ID -16413 and the Chooser name as being 'STR ' ID -16096. It also
states that the string should be treated as READ ONLY.  Happy programming.
Regards,
Benjamin Beasley

In article <2A6C8767.27416@noiro.acs.uci.edu>, pamiri@uci.edu writes:
> 
> How does one go about getting the Chooser Name (System 6) or Owner's Name
> (System 7)?
> 
> Peter
From: brianc@acuson.com (Brian Cox)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think C 5.0 under sys7, help!!!
Date: 30 Jul 92 00:04:32 GMT
Organization: Acuson; Mountain View, California

wombat@claris.com (Scott Lindsey) writes:

>In article <1992Jul25.053648.12278@midway.uchicago.edu>, hd12@ellis.uchicago.edu (hui  dong) writes:
>> 
>> I am trying to use Think C 5.0 under sys7 to recompile a C code I wrote
>> using 4.0 under sys6. I get lots of errors, drive me crazy! It even complains
>> about GetNewCWindow(WINDOW_ID,0L,-1L), saying the last argument isn't valid.

>You basically have two choices.  If you turn prototype enforcement off, you
>should get fewer, if any, errors.  The "correct" thing to do is to fix your
>code so it correctly observes the prototypes.  In your example, the last arg
>to GetNewCWindow is of type WindowPtr.  -1L isn't a windowptr (it's a long --
>yes, 0 is a special case when it comes to constants).  If you cast it, it
>should work "GetNewCWindow(WINDOW_ID, 0L, (WindowPtr) -1L);"

>--
>Scott Lindsey <wombat@claris.com>

A common trick is to 

#define IN_FRONT	(WindowPtr) -1L

and then use IN_FRONT to say what you really mean.  I have also experienced
the very real pain in converting "working" code from 4.0 to 5.0.  But I
discovered that I was not as careful as I had thought.  Sure there were
a whole bunch of ticky-tacky things like the WindowPtr thing above.  But the
kind of bug that type checking uncovers are just about the most annoying and
difficult to detect otherwise.  In the end it is WAY worth it. (IMO)


-- 

					   --Brian Cox--
------------------
From: greeny@top.cis.syr.edu (J. S. Greenfield)
Newsgroups: comp.sys.mac.programmer
Subject: Moving to the foreground after receiving an 'odoc' from the Finder
Date: 20 Jul 92 23:53:34 GMT
Organization: Syracuse University, CIS Dept.


What is the standard technique to insure that your application is in the
foreground after receiving an 'odoc' event from the finder?

I have an application (which does not recieve suspend/resume events) which
brings up a custom get file after receiving an 'odoc' event.  If there are
some finder windows open, the get file dialog will occasionally appear
*behind* the finder windows, initially.  It then moves to the front, but
the dialog window is left empty.

Can anyone provide me with references to relevant portions of IM or the
technical notes?


Thanks in advance.


-- 
J. S. Greenfield                                         greeny@top.cis.syr.edu
(I like to put 'greeny' here, 
but my d*mn system wants a 
*real* name!)                        "What's the difference between an orange?"
From: jeremyr@dcs.qmw.ac.uk (Jeremy Roussak)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Attention all Shareware authors
Date: 22 Jul 92 17:42:52 GMT
Distribution: comp.sys.mac.misc, comp.sys.mac.programmer
Organization: Computer Science Dept, QMW, University of London

In <1992Jul22.120410.10501@nic.unh.edu> mld@kepler.unh.edu (Michael L Dupuis) writes:

>I'm not sure if this has been discussed before, but I am thinking about
>doing some shareware development in the future and I was wondering:

>How many actual payments received constitutes a successful program?
I suspect that the number of payments is less relevant than the
proportion of registered copies, which is very hard to assess.

>What's the best way to actually get people to pay for what they decide to
>keep?  Crippled Demos?  Honor System?  Guilt?
Personally, I don't bother with crippled demos. Probably the
best way is the one chosen by CompactPro: put up a mildly
irritating splash screen which has to be dismissed each time.
Tricky to know what to do for INITs, though.

>What percentage of copies in use are not payed for(estimate)?
Difficult to say: you can get a very rough estimate from the
download counts in the various bulletin boards, but it doesn't
take any account of the people who try it and delete it, or of
those who pass copies to friends. I was amused recently to get
a bug report about Apollo (an INIT of mine that is now free,
but will be shareware when finished) from someone who kindly
listed other INITs he was running. One of them was something
else I'd written, which was shareware. Of course, he hadn't
paid and suddenly became very quiet when I gently pointed this
out.

>If I do develop, the money won't be the primary purpose, but I was wondering
>if it would be worth it to try and get some payment for the development.

I suspect most shareware authors feel like this.

Jeremy
Newsgroups: comp.sys.mac.programmer
From: jcav@quads.uchicago.edu (JohnC)
Subject: Re: Moving to the foreground after receiving an 'odoc' from the Finder
Reply-To: jcav@midway.uchicago.edu
Organization: The Royal Society for Putting Things on Top of Other Things
Date: Thu, 23 Jul 1992 16:15:26 GMT

In article <1992Jul23.173645.9578@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
>In article <1992Jul21.161251.7693@midway.uchicago.edu>, jcav@quads.uchicago.edu (JohnC) writes:
>> If you accept high-level events, you also _must_ accept OS events
>> (suspend/resume, etc).
>
>I have a counterexample to this claim: Adobe Premiere 1.0. Here are the
>settings of some of its "SIZE" resource bits:
>
>	accept suspend events: no
>	does activate on FG switch: no
>	32-bit compatible: yes
>	high-level event aware: yes

I was too emphatic (read: "incorrect") when I said "_must_".  However, I
still maintain that there's no good reason for an application written after
1986 to _not_ accept suspend/resume events.  They're just too easy to support,
and at the least alleviate the need for the OS to waste machine cycles on the
infamous Switcher/Multifinder desk accessory switching fakeout.

Hmm, come to think of it, what I may have been imperfectly recalling was
the documentation stating that if you set the activate-on-FG bit then you
should also set the accept-suspend-events bit.

Anyway...

-- 
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
From: zaphod@bluemoon.rn.com (Peter Bierman)
Subject: Re: Top Ten Things I'd Like to See in Think Pasal
Organization: Blue Moon BBS ((614) 868-998[024])
Date: Tue, 28 Jul 92 21:50:33 EDT

peter@cujo.curtin.edu.au (Peter N Lewis) writes:

> Background compilation, and actually calling WNE while compiling - THINK
> Back solves this problem so I guess its not an issue anymore, wow, one
> actually gets deleted from my list! :-)

What is ThinkBack and where can I get it!


---
The opinions I express are rarely my own, becuase my own are far too 
outragous to post here.

IntNet:zaphod@bluemoon.rn.com    FutureNet: #33@#10
The Metropolis (614)-846-1911
---
Newsgroups: comp.sys.mac.programmer
Subject: Re: A few more suggestions for THINK C
From: baker4@husc10.harvard.edu (David Baker)
Date: 29 Jul 92 12:43:41
Distribution: comp
Organization: Department of Psychology, Harvard University
In-reply-to: peterc@cubetech.com's message of Fri, 24 Jul 92 20:42:21 CDT


In article <dx3uv972.9c6tdb@moebius.cubetech.com> peterc@cubetech.com (Peter Creath) writes:


   lea		myVariable,A0
   move.w	#0x04,D0
   muls.w	#0x0304,D0
   add.w	D0,A0
   ^^^^^^^^^^^^^^^^^^
   move.l	(A0),D1
   lea		myVariable,A0	/* note the redundance -- the correct address */
   move.w	#0x04,D0		/* is already in A0 */
   muls.w	#0x0304,D0


Um, that there line looks like a0 no longer contains yourVariable.

--
-------------------------------------------------------------------------------
David P. Baker				Misbrainer:
Work: dpb@huelings.harvard.edu		The onions impressed herein are mine,
Home: baker4@husc.harvard.edu		knot throes of my imploder.
Office: William James Hall 844		He wouldn't want 'em, anyway.
	Department of Psychology
	Harvard University		If responding by mail, please use my
	(617) 495-3773			"Work" address above.
-------------------------------------------------------------------------------
From: admiraal@bio.vu.nl
Newsgroups: comp.sys.mac.programmer
Subject: reducing TCL project size
Date: 23 Jul 92 17:45:27 GMT
Followup-To: comp.sys.mac.programmer
Organization: VU Biology, Amsterdam, The Netherlands

I am starting on a project using Think C's TCL. After compiling the first
attempts I discovered that the project takes around 2 Megabytes of disk
space. I remember a discussion (I don't know if it was this news group)
where a method was given to reduce the size to around 1 Megabyte. Of course
I forgot to remember and/or save it. So can someone explain (again?) how it
works ?

Frank